Adicionei nгo adianto nada
CMD \/
pawn Код:
if(strcmp(cmd, "/vendercasa", true) == 0) {
if(IsPlayerAdmin(playerid)){
new plid;
new tmp[256];
new nome[MAX_PLAYER_NAME];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_RED, "/vendercasa [id]");
return 1;
}
plid = strval(tmp);
GetPlayerName(plid,nome,MAX_PLAYER_NAME);
if (udb_Exists(nome)) {
new Float:X, Float:Y, Float:Z;
new File:temp;
new string[256];
GetPlayerPos(playerid, X, Y, Z);
udb_setPosition(nome, X, Y, Z);
udb_setAng(nome, 0);
SendClientMessage(playerid, COLOR_GREEN, "Casa vendida");
printf("%s acaba de vender um imуvel para %s",PlayerName(playerid),nome);
format(string, sizeof(string), "%f, %f, %f, //%s\r\n", X, Y, Z, nome);
temp = fopen("pickups.rpg", io_append);
fwrite(temp, string);
fclose(temp);
AddStaticPickup(1273,1,X,Y,Z);
format(string, sizeof(string), "Casa de %s", PlayerName(plid));
Create3DTextLabel(string, COLOR_GREEN, X, Y, Z+0.50, 25.0, 0);
LogarPlayer(plid);
return 1;
}
else {
SendClientMessage(playerid,COLOR_RED,"ERRO: ID invбlido, ou jogador nгo cadastrado.");
return 1;
}
}
else{
SendClientMessage(playerid, COLOR_RED, "Vocк nгo tem permissгo");
return 1;
}
}