04.06.2015, 18:36
(
Последний раз редактировалось Sn4ke2; 04.06.2015 в 19:45.
)
hello guys how to make to can type /getgift once of PayDay?
sorry for my bad english
PHP код:
CMD:getgift(playerid, params[])
{
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "Trebuie sa te loghezi mai intai.");
if(IsPlayerInAnyVehicle(playerid)) return SCM(playerid,COLOR_WHITE,"{37B9C8}Please get out of the car.");
if(!IsPlayerInRangeOfPoint(playerid, 7.0, 1516.1532,-1655.5228,13.5392)) return SCM(playerid,COLOR_WHITE, "Nu esti la locul unde poti folosi [/getgift] (LSPD/Spawn Civil).");
{
{
new Random = random(6);
switch(Random)
{
case 0:
{
GivePlayerCash(playerid,25000);
Update(playerid,pCashx);
SendClientMessage(playerid, COLOR_WHITE, "Felicitari!Ai castigat 25.000$");
}
case 1:
{
SendClientMessage(playerid, COLOR_WHITE, "Felicitari!Ai castigat 5 coins");
}
case 2:
{
PlayerInfo[playerid][pMats] += 50000;
Update(playerid,pMatsx);
SendClientMessage(playerid, COLOR_WHITE, "Felicitari!Ai castigat 50000 materiale");
}
case 3:
{
PlayerInfo[playerid][pDrugs] += 10;
new wakaname[25],str2[128];
GetPlayerName(playerid,wakaname,sizeof(wakaname));
format(str2,sizeof(str2),"UPDATE users SET `Drugs`='%d' WHERE `name`='%s'",PlayerInfo[playerid][pDrugs],wakaname);
mysql_query(SQL,str2);
SendClientMessage(playerid, COLOR_WHITE, "Felicitari!Ai castigat 10 grame de droguri");
}
case 4:
{
PlayerInfo[playerid][pExp] += 2;
SendClientMessage(playerid, COLOR_WHITE, "Felicitari!Ai castigat 2 respect points");
}
case 5:
{
SendClientMessage(playerid, COLOR_WHITE, "Felicitari!Ai castigat inca 2 cadouri! [/getgift]");
}
}
}
}
return 1;
}