/takemoney
#1

Hello , can someone help me with an command /takemoney

That is the command /givemoney from my gamemode

Quote:

if(strcmp(cmd, "/givemoney", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "» Scrie: /givemoney [playerid/PartOfName] [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)
{
//ConsumingMoney[playa] = 1;
GivePlayerMoney(playa, money);
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, 256, "{30a030}[GameFront]: {ff6347}Admin %s i-a dat suma de %s lui %s (Money by Admin).", sendername,giveplayer,saveGM(money));
SendAdminMessage(COLOR_ADMIN,string);
PayLog(string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "{30a030}[GameFront]: {ffffff}Ne pare rau, dar nu ai levelul necesar pentru a utiliza aceasta comanda.");
}
}
return 1;
}

Thanks in advance .
Reply


Messages In This Thread
/takemoney - by Sp3cter - 10.08.2012, 14:21
Re: /takemoney - by [MM]RoXoR[FS] - 10.08.2012, 14:25
Re: /takemoney - by Sp3cter - 10.08.2012, 14:28

Forum Jump:


Users browsing this thread: 1 Guest(s)