Eu falei ele n acreditou.... acha q sу homem q sabe de pawn hahaha
pawn Код:
#define PASTA_Int "/Interiores/%s.ini" //Diretуrio onde as contas sгo salvas
//======================na outra parte=============
if(!dini_Exists("/Interiores/int0.ini")){
dini_Create("/Interiores/int0.ini");
dini_IntSet("/Interiores/int0.ini", "Int", 1);
dini_FloatSet("/Interiores/int0.ini", "EX", 222.9534);
dini_FloatSet("/Interiores/int0.ini", "EY", 1287.7649);
dini_FloatSet("/Interiores/int0.ini", "EZ", 1082.1406);
}
if(!dini_Exists("/Interiores/int1.ini")){
dini_Create("/Interiores/int1.ini");
dini_IntSet("/Interiores/int1.ini", "Int", 4);
dini_FloatSet("/Interiores/int1.ini", "EX", 261.0827);
dini_FloatSet("/Interiores/int1.ini", "EY", 1284.6899);
dini_FloatSet("/Interiores/int1.ini", "EZ", 1080.2578);
}
//===============e por fim comandtext==============
if(strcmp(cmd, "/criarcasa", true) == 0) {
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
if(pAdmin[playerid] == 5){
new tmp[256];
new preco, int;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)){
SendClientMessage(playerid, Vermelho, "/criarcasa [preзo] [interiorID]");
return 1;
}
preco = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)){
SendClientMessage(playerid, Vermelho, "/criarcasa [preзo] [interiorID]");
return 1;
}
int = strval(tmp);
format(string, sizeof(string), "/Casas/casa%d.ini", proximacasa);
if(!dini_Exists(string)){
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
dini_Create(string);
dini_FloatSet(string, "PosX", X);
dini_FloatSet(string, "PosY", Y);
dini_FloatSet(string, "PosZ", Z);
dini_IntSet(string, "Int", int);
dini_IntSet(string, "Mundo", proximacasa);
dini_IntSet(string, "TDono", 0);
dini_Set(string, "Dono", "Ninguem");
dini_IntSet(string, "Preco", preco);
dini_IntSet(string, "Trancada", 0);
dini_IntSet(string, "TMorador", 0);
dini_Set(string, "Morador", "Ninguem");
new pickupid;
pickupid = CreatePickup(1273, 1, dini_Float(string, "PosX"), dini_Float(string, "PosY"), dini_Float(string, "PosZ"), -1);
dini_IntSet(string, "Id", pickupid);
new string2[222];
format(string2, sizeof(string2), "Casa %d", proximacasa);
Create3DTextLabel(string2,0xFFFFFFAA, dini_Float(string, "PosX"), dini_Float(string, "PosY"), dini_Float(string, "PosZ")+0.75,20.0,0,1);
proximacasa++;
}
}
return 1;
}