15.06.2014, 09:35
well
PHP код:
if(strcmp(cmd, "/givecash", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GREY, "USAGE: /givecash [player id/name] [money]");
return 1;
}
new playa;
new money;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
money = strval(tmp);
if (PlayerInfo[playerid][pAdmin] >= 5)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
ConsumingMoney[playa] = 1;
GivePlayerMoney(playa, money);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You are not a admin!");
}
}
return 1;
}