if(strcmp(cmd, "/setstat", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "UTILIZEAZA: /setstat [IDJucator/PARTEdinNUME] [statcode] [cantitate]");
SendClientMessage(playerid, COLOR_GRAD4, "|1 Level |2 SpawnHealth |3 UpgradePoints |4 Model |5 BankAccount");
SendClientMessage(playerid, COLOR_GRAD3, "|6 PhoneNumber |7 RespectPoints |8 HouseKey |9 BizKey |10 DonateRank");
SendClientMessage(playerid, COLOR_GRAD2, "|11 INTERDICTIE (1|255) |12 Det |13 Lawyer |14 Fixer |15 News |16 Jack |17 Drug");
SendClientMessage(playerid, COLOR_GRAD2, "|18 Sex |19 Box |20 PassKey |21 VehKey1 |22 VehKey2 |23 VehKey3");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "UTILIZEAZA: /setstat [IDJucator/PARTEdinNUME] [statcode] [cantitate]");
SendClientMessage(playerid, COLOR_GRAD4, "|1 Level |2 SpawnHealth |3 UpgradePoints |4 Model |5 BankAccount");
SendClientMessage(playerid, COLOR_GRAD3, "|6 PhoneNumber |7 RespectPoints |8 HouseKey |9 BizKey |10 DonateRank");
SendClientMessage(playerid, COLOR_GRAD2, "|11 INTERDICTIE (1|255) |12 Det |13 Lawyer |14 Fixer |15 News |16 Jack |17 Drug");
SendClientMessage(playerid, COLOR_GRAD2, "|18 Sex |19 Box |20 PassKey |21 VehKey1 |22 VehKey2 |23 VehKey3");
return 1;
}
new stat;
stat = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "UTILIZEAZA: /setstat [IDJucator/PARTEdinNUME] [statcode] [cantitate]");
SendClientMessage(playerid, COLOR_GRAD4, "|1 Level |2 SpawnHealth |3 UpgradePoints |4 Model |5 BankAccount");
SendClientMessage(playerid, COLOR_GRAD3, "|6 PhoneNumber |7 RespectPoints |8 HouseKey |9 BizKey |10 DonateRank");
SendClientMessage(playerid, COLOR_GRAD2, "|11 INTERDICTIE (1|255) |12 Det |13 Lawyer |14 Fixer |15 News |16 Jack |17 Drug");
SendClientMessage(playerid, COLOR_GRAD2, "|18 Sex |19 Box |20 PassKey |21 VehKey1 |22 VehKey2 |23 VehKey3");
return 1;
}
new amount;
amount = strval(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1338)
{
switch (stat)
{
case 101:
{
PlayerInfo[giveplayerid][pLevel] = amount;
format(string, sizeof(string), " The Player Was Set To Level %d", amount);
}
case 102:
{
PlayerInfo[giveplayerid][pSHealth] = amount;
format(string, sizeof(string), " The Player Was Set To %d Spawnhealth ", amount);
}
case 103:
{
PlayerInfo[giveplayerid][gPupgrade] = amount;
format(string, sizeof(string), " The Player Was Set To %d Upgrade Points", amount);
}
case 4:
{
PlayerInfo[giveplayerid][pModel] = amount;
format(string, sizeof(string), " The Player Was Set To Model %d", amount);
}
case 105:
{
PlayerInfo[giveplayerid][pAccount] = amount;
format(string, sizeof(string), " The Player Account Was Set To $%d", amount);
}
case 6:
{
PlayerInfo[giveplayerid][pPnumber] = amount;
format(string, sizeof(string), " The Player Phone Number Was Set To %d", amount);
}
case 107:
{
PlayerInfo[giveplayerid][pExp] = amount;
format(string, sizeof(string), " The Player Respect Points Were Set To %d", amount);
}
case 8:
{
PlayerInfo[giveplayerid][pPhousekey] = amount;
format(string, sizeof(string), " The Player House Key Was Set To %d", amount);
}
case 9:
{
PlayerInfo[giveplayerid][pPbiskey] = amount;
format(string, sizeof(string), " The Player Business Key Was Set To %d", amount);
}
case 1010:
{
PlayerInfo[giveplayerid][pDonateRank] = amount;
new name[30];
GetPlayerName(giveplayerid, name, sizeof(name));
new text1[256];
new culoare;
if(amount == 0) { culoare = COLOR_LIGHTRED; text1 = "a ramas fara donator (Abuzuri/Expirarea termenului)"; }
if(amount == 1) { culoare = COLOR_GREEN; text1 = "a primit Donator de Bronz"; }
if(amount == 2) { culoare = COLOR_GREEN; text1 = "a primit Donator de Argint"; }
if(amount == 3) { culoare = COLOR_GREEN; text1 = "a primit Donator de Aur"; }
format(string, sizeof(string), " Jucatorul %s %s", name, text1);
SendClientMessageToAll(culoare, string);
return 1;
}
case 11:
{
PlayerInfo[giveplayerid][pFMember] = amount;
format(string, sizeof(string), " Acest player nu va mai avea acces in alta factiune %d", amount);
}
case 1012:
{
PlayerInfo[giveplayerid][pDetSkill] = amount;
format(string, sizeof(string), " The Player Detective Skill Set To %d", amount);
}
case 1013:
{
PlayerInfo[giveplayerid][pLawSkill] = amount;
format(string, sizeof(string), " The Player Lawyer Skill Set To %d", amount);
}
case 1014:
{
PlayerInfo[giveplayerid][pMechSkill] = amount;
format(string, sizeof(string), " The Player Car Mechanic Skill Set To %d", amount);
}
case 1015:
{
PlayerInfo[giveplayerid][pNewsSkill] = amount;
format(string, sizeof(string), " The Player News Reporter Skill Set To %d", amount);
}
case 1016:
{
PlayerInfo[giveplayerid][pJackSkill] = amount;
format(string, sizeof(string), " The Player Car Jacker Skill Set To %d", amount);
}
case 1017:
{
PlayerInfo[giveplayerid][pDrugsSkill] = amount;
format(string, sizeof(string), " The Player Drug Dealer Skill Set To %d", amount);
}
case 1018:
{
PlayerInfo[giveplayerid][pSexSkill] = amount;
format(string, sizeof(string), " The Player Sex Skill Set To %d", amount);
}
case 1019:
{
PlayerInfo[giveplayerid][pBoxSkill] = amount;
format(string, sizeof(string), " The Player Box Skill Set To %d", amount);
}
case 1021:
{
PlayerInfo[giveplayerid][pPcarkey1] = amount;
format(string, sizeof(string), " The Player VehKey1 Set To %d", amount);
}
case 1022:
{
PlayerInfo[giveplayerid][pPcarkey2] = amount;
format(string, sizeof(string), " The Player VehKey2 Set To %d", amount);
}
case 1023:
{
PlayerInfo[giveplayerid][pPcarkey3] = amount;
format(string, sizeof(string), " The Player VehKey3 Set To %d", amount);
}
case 1024:
{
PlayerInfo[giveplayerid][pPcarkey4] = amount;
format(string, sizeof(string), " The Player VehKey4 Set To %d", amount);
}
case 1025:
{
PlayerInfo[giveplayerid][pPcarkey5] = amount;
format(string, sizeof(string), " The Player VehKey5 Set To %d", amount);
}
case 1026:
{
PlayerInfo[giveplayerid][pPcarkey6] = amount;
format(string, sizeof(string), " The Player VehKey6 Set To %d", amount);
}
case 1027:
{
PlayerInfo[giveplayerid][pPcarkey7] = amount;
format(string, sizeof(string), " The Player VehKey7 Set To %d", amount);
}
case 1028:
{
PlayerInfo[giveplayerid][pPcarkey8] = amount;
format(string, sizeof(string), " The Player VehKey8 Set To %d", amount);
}
case 1077:
{
PlayerInfo[giveplayerid][pJob] = amount;
format(string, sizeof(string), " The Player Job Set To %d", amount);
}
case 1088:
{
PlayerInfo[giveplayerid][pContractTime] = amount;
format(string, sizeof(string), " The Player Job Contract Time Set To %d", amount);
}
default:
{
format(string, sizeof(string), " Invalid Stat Code", amount);
}
}
SendClientMessage(playerid, COLOR_GRAD1, string);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Nu esti autorizat pentru folosirea comenzii!");
}
}//not valid id
}//not connected
}
return 1;
} Cand dau setstat la unele din comenzi de exmplu cand vreau sa setez level-ul cuiva imi da "Invalid Code State " Va rog sa ma ajutati .