[Ajuda] Limite /Transferir
#1

Alguem ajuda a por o limite de 1000 R$ no /transferir
Quote:

if(strcmp(cmd, "/transferir", true) == 0) {
if(PlayerInfo[playerid][pLevel] > 4){
new giveplayerid;
new moneys;
new giveplayer[MAX_PLAYER_NAME];
new sendername[MAX_PLAYER_NAME];
new playermoney2;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, Vermelho, "Digite: /transferir [id] [quantia]");
return 1;
}
giveplayerid = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, Vermelho, "Digite: /transferir [id] [quantia]");
return 1;
}
moneys = strval(tmp);
if (IsPlayerConnected(giveplayerid)) {
if (GetDistanceBetweenPlayers(giveplayerid,playerid) < 21){
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
playermoney2 = GetPlayerGrana(playerid);
if (moneys > 0 && playermoney2 >= moneys) {
GivePlayerGrana(playerid, (0 - moneys));
GivePlayerGrana(giveplayerid, moneys);
format(string, sizeof(string), "Vocк enviou a %s (%d) a importвncia de $%d.", giveplayer,giveplayerid, moneys);
SendClientMessage(playerid, 0xD9D900AA, string);
format(string, sizeof(string), "Vocк recebeu $%d de %s (%d).", moneys, sendername, playerid);
SendClientMessage(giveplayerid, 0xD9D900AA, string);
}else{
SendClientMessage(playerid, Vermelho, "| ERRO | Valor invбlido.");
}
} else {
SendClientMessage(playerid, Vermelho, "| ERRO | Longe demais, chegue mais perto!");
}
} else {
SendClientMessage(playerid, Vermelho, "| ERRO | Jogador nгo conectado");
}
}else{
SendClientMessage(playerid, Vermelho, "| ERRO | Vocк nгo tem level suficiente , vocк precisa ter level maior ou igual a 5!");
}
return 1;
}

Reply


Messages In This Thread
Limite /Transferir - by vinilol321 - 28.06.2016, 03:56
Respuesta: Limite /Transferir - by SammyJ - 28.06.2016, 04:11
Re: Limite /Transferir - by vinilol321 - 28.06.2016, 05:13
Respuesta: Limite /Transferir - by SammyJ - 28.06.2016, 05:23
Re: Limite /Transferir - by Monotox - 28.06.2016, 05:32
Re: Limite /Transferir - by vinilol321 - 28.06.2016, 05:41
Re: Limite /Transferir - by vinilol321 - 28.06.2016, 05:51
Respuesta: Limite /Transferir - by SammyJ - 28.06.2016, 05:54
Re: Respuesta: Limite /Transferir - by zSuYaNw - 28.06.2016, 20:30

Forum Jump:


Users browsing this thread: 2 Guest(s)