Jump to content
  • 0

pomoc RZE by QWER


Nitro-Game

Dotaz

Dorbý den, chtěl bych se zeptat stáhl jsem si rze od qwera a přeložil jsem ji z jazyka sk do jazyka cz a když se přihlašuji na server vše jde a pak se objeví dialog že to chce registraci tak dávám heslo "789654123" pak dialog zmizí a objeví se zase dialog pro registraci tak dám to stejné heslo "789654123" a pak to zmizí a další se neobjeví pak dám spawn a napíše to ihned Server closed the connection.

 

Screen: http://jyxo.info/uploads/9B/9ba03aeab1279ebdb93927b95fdbf1ba5b212d82.png

Link to comment
Share on other sites

Recommended Posts

  • 0

Psal jsem ti to do tématu BS,BS, ale budiž tu to máš znovu :

 

V té rze to je udělané pomocí property :

 

To co ti posouvá ty nemovitosti je na začátku public OnGameModeInit():


(604)public OnGameModeInit()
{
new Float:pos,id;
for(new i; i < MAX_PROPERTY_TYPE;i++){
id++;
//printf("%d",5-id); pos: 2044.85, 1174.78, 10.67
    CreateProperty(MAX_PROPERTY_TYPE-id,2044.85, 1174.78+pos, 10.67,100);
pos += 50;
}

 

 

(254)//================================= Property System ==============================//
#define MAX_PROPERTY 50
#define MAX_PROPERTY_TYPE 10
#define MAX_PROPERTY_NAME 45
#define PROPERTY_DEFAULT_PRICE 300
#define PROPERTY_DEFAULT_OWNER "Nikdo"
#define PROPERTY_LABEL_COLOR 0xFF0000FF
#define MAX_DEFAULT_CENA 2500
#define MIN_DEFAULT_NAME 3

#define DIALOG_PROPERTY_BUY 1300

#define DIALOG_FARBA_OWNER 1301
#define DIALOG_KOLESA_OWNER 1302
#define DIALOG_OPRAVA_OWNER 1303
#define DIALOG_AMMO_OWNER 1304
#define DIALOG_JEDLO_OWNER 1305

#define DIALOG_FARBA_SHOP 1306
#define DIALOG_KOLESA_SHOP 1307
#define DIALOG_OPRAVA_SHOP 1308
#define DIALOG_AMMO_SHOP 1309
#define DIALOG_JEDLO_SHOP 1310

#define DIALOG_TYP_CHANGE 1311
#define DIALOG_PRICE_CHANGE 1312
#define DIALOG_NAME_CHANGE 1313
#define DIALOG_PROPERTY_SELL 1314

#define DIALOG_KABRIOLET_OWNER 1315
#define DIALOG_MOTO_OWNER 1316
#define DIALOG_LOWRIDER_OWNER 1317
#define DIALOG_OFFROAD_OWNER 1318
#define DIALOG_FAST_OWNER 1319

#define DIALOG_KABRIOLET_SHOP 1320
#define DIALOG_MOTO_SHOP 1321
#define DIALOG_LOWRIDER_SHOP 1322
#define DIALOG_OFFROAD_SHOP 1323
#define DIALOG_FAST_SHOP 1324

#define DIALOG_TYP_CHANGE2 1325

#define DAYS 86400*4
// Pri prvom vytvorení - aby tam bol niaky názov (majiteľ si ho potom zmení, len tam musí byť názov)
new DefaultName[MAX_PROPERTY_TYPE][MAX_PROPERTY_NAME] = {
"Pay and Spray",
"Wheels Servis",
"Repair Servis",
"Ammo Nation",
"Burger Shoot",
"Kabriolet Store",
"Bike Store",
"Lowrider car Store",
"OffRoad car Store",
"Sport Store"
};

/*
0 - FARBA
1 - KOLESA
2 - OPRAVA
3 - AMMO
4 - JEDLO
5 - KABRILOET
6 - MOTO
7 - LOWRIDER
8 - OFFROAD
9 - FAST

*/
#define FARBA 0
#define KOLESA 1
#define OPRAVA 2
#define AMMO 3
#define JEDLO 4
#define KABRIOLET 5
#define MOTO 6
#define LOWRIDER 7
#define OFFROAD 8
#define FAST 9
// Premenne
new Float:PropertyPos[MAX_PROPERTY][3]; // Pozície (x,y,z) nehnuteľnosti
new PropertyType[MAX_PROPERTY]; // Typ nehnuteľnosti
new PropertyCost[MAX_PROPERTY]; // Cena nehnuteľnosti
new PropertyPrice[MAX_PROPERTY] = {PROPERTY_DEFAULT_PRICE,...}; // Vlastná cena tovaru
new Text3D:PropertyLabel[MAX_PROPERTY]; // 3D Text Label
new PropertyOwner[MAX_PROPERTY][MAX_PLAYER_NAME]; // Majiteľ
new PropertyName[MAX_PROPERTY][MAX_PROPERTY_NAME]; // Názov
new PropertyProfit[MAX_PROPERTY]; // Tržba
new PropertyPC[MAX_PROPERTY];

new PropertyConnect[MAX_PROPERTY];

new PlayerCP[MAX_PLAYERS] = {-1,...};
new PlayerIN[MAX_PLAYERS] = {-1,...};
new PC = -1;

forward PropertySaveAll();

(482)//================================= Property System ==============================//

stock CreateProperty(typ,Float:x,Float:y,Float:z,cost){
PC++;
if(PC < MAX_PROPERTY){
PropertyPos[PC][0] = x;
PropertyPos[PC][1] = y;
PropertyPos[PC][2] = z;
if(typ < 0 || typ >= MAX_PROPERTY_TYPE) return printf("(%d/%d) Nehnutelnosť má zlý typ !",PC,MAX_PROPERTY_TYPE);
PropertyType[PC] = typ;
PropertyCost[PC] = cost;
new str[256];
format(str,100,"Property/%d.txt",PC);
if(!fexist(str)){
new File:file = fopen(str,io_write);
format(str,256,"%s %d %d %d %d %s",PROPERTY_DEFAULT_OWNER,-1,PROPERTY_DEFAULT_PRICE,0,typ,DefaultName[typ]);
/* O C P Z N */
// O - Owner P - Price    Z - Zisk (profit) N - Name (property)
fwrite(file,str);
fclose(file);
PropertyPrice[PC] = PROPERTY_DEFAULT_PRICE;
format(PropertyName[PC],MAX_PROPERTY_NAME,"%s",DefaultName[typ]);
format(PropertyOwner[PC],MAX_PLAYER_NAME,"%s",PROPERTY_DEFAULT_OWNER);
}else{
new File:file = fopen(str,io_read);
fread(file,str);
DelChar(str);
sscanf(str,"siiiiz",PropertyOwner[PC],PropertyConnect[PC],PropertyPrice[PC],PropertyProfit[PC],PropertyType[PC],PropertyName[PC]);
//printf("|%s|%d|%d|%d|%d|%s|",PropertyOwner[PC],PropertyConnect[PC],PropertyPrice[PC],PropertyProfit[PC],PropertyType[PC],PropertyName[PC]);
}
PropertyPC[PC] = CreateStreamCp(x, y, z, 2.5); //
format(str,256,"Nehnuteľnosť č.{FFFFFF}%d\n{FFFFFF}%s\n{FF0000}Owner: {FFFFFF}%s",PC,PropertyName[PC],PropertyOwner[PC]);
PropertyLabel[PC] = Create3DTextLabel(str,PROPERTY_LABEL_COLOR,x,y,z+1, 80, 0, 1);
CreateMapIcon(8, -1, x, y, z);
//CreateDynamicMapIcon(x, y, z, 8, -1, -1, -1, -1, 100.0);
}else printf("(%d/%d) Na servery je moc nehnutelností ! ",PC,MAX_PROPERTY);
return true;
}

stock PropertySave(id){
new str[256];
format(str,100,"Property/%d.txt",id);
new File:file = fopen(str,io_write);
if(PropertyConnect[id]+DAYS > gettime()){
format(str,256,"%s %d %d %d %d %s",PropertyOwner[id],PropertyConnect[id],PropertyPrice[id],PropertyProfit[id],PropertyType[id],PropertyName[id]);
}else{
format(str,256,"%s %d %d %d %d %s",PROPERTY_DEFAULT_OWNER,-1,PROPERTY_DEFAULT_PRICE,0,PropertyType[id],DefaultName[PropertyType[id]]);
}
/* O P Z N */
// O - Owner P - Price    Z - Zisk (profit) N - Name (property)
fwrite(file,str);
fclose(file);
}

public PropertySaveAll(){
for(new id; id <= PC;id++){
new str[256];
format(str,100,"Property/%d.txt",id);
new File:file = fopen(str,io_write);
if(PropertyConnect[id]+DAYS > gettime()){
format(str,256,"%s %d %d %d %d %s",PropertyOwner[id],PropertyConnect[id],PropertyPrice[id],PropertyProfit[id],PropertyType[id],PropertyName[id]);
}else{
format(str,256,"%s %d %d %d %d %s",PROPERTY_DEFAULT_OWNER,-1,PROPERTY_DEFAULT_PRICE,0,PropertyType[id],DefaultName[PropertyType[id]]);
}
/* O C P Z N */
// O - Owner P - Price    Z - Zisk (profit) N - Name (property) C - Connect (last)
fwrite(file,str);
fclose(file);
}
}

stock GetPlayerPropertyID(playerid){
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,MAX_PLAYER_NAME);
for(new i; i <= PC;i++){
if(!strcmp(name,PropertyOwner[i],false)){
return i;
}
}
return -1;
}

stock IsPlayerPropertyOwner(playerid,id){
if(!strcmp(PlayerName(playerid),PropertyOwner[id],false)) return true;
return false;
}

stock GetPropertyOwner(playerid,id){
return PropertyName[id];
}

stock IsPropertyForSale(id){
if(!strcmp(PROPERTY_DEFAULT_OWNER,PropertyOwner[id],false)) return true;
return false;
}

//A to hlavní co ti posouvá ty nemovitosti:
(604)public OnGameModeInit()
{
new Float:pos,id;
for(new i; i < MAX_PROPERTY_TYPE;i++){
id++;
//printf("%d",5-id); pos: 2044.85, 1174.78, 10.67
    CreateProperty(MAX_PROPERTY_TYPE-id,2044.85, 1174.78+pos, 10.67,100);
pos += 50;
}
....

 

 

 

E: Jinak ty nemovitosti máš vytvořené ve Scriptfiles.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...