Doresc sa scot pgpoints si in locul acestora sa bag un timp.Adica comanda acum poate fi folosita atunci cand ai acele pGPoints, si vreau sa o poti folosii odata la 3 ore.Ma puteti ajuta?
CMD:getgift(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
if(PlayerToPoint(5.0, playerid, 1713.8951,-1847.7421,13.5709))
{
if(PlayerInfo[playerid][pGPoints] >= 3)
{
new cadou = random(9)+2;
if(cadou == 1)
{
GivePlayerCash(playerid, 25000);
Update(playerid, pCashx);
PlayerInfo[playerid][pGPoints] -= 3;
Update(playerid, pGPointsx);
new gift[128];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(gift, sizeof(gift),"* %s a primit un cadou! [25.000$]",name);
ProxDetector(10.0, playerid, gift,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
GameTextForPlayer(playerid, "~g~25,000$!", 5000, 1);
return 1;
}
if(cadou == 2)
{
GivePlayerCash(playerid, 50000);
PlayerInfo[playerid][pGPoints] -= 3;
Update(playerid, pGPointsx);
Update(playerid, pCashx);
GameTextForPlayer(playerid, "~g~50,000$!", 5000, 1);
new gift[128];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(gift, sizeof(gift),"* %s a primit un cadou! [50.000$]",name);
ProxDetector(10.0, playerid, gift,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
return 1;
}
if(cadou == 3)
{
GivePlayerCash(playerid, 100000);
PlayerInfo[playerid][pGPoints] -= 3;
Update(playerid, pGPointsx);
Update(playerid, pCashx);
new gift[128];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(gift, sizeof(gift),"* %s a primit un cadou! [100.000$]",name);
ProxDetector(10.0, playerid, gift,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
GameTextForPlayer(playerid, "~g~100,000$!", 5000, 1);
return 1;
}
if(cadou == 4)
{
GivePlayerCash(playerid, 150000);
PlayerInfo[playerid][pGPoints] -= 3;
Update(playerid, pGPointsx);
Update(playerid, pCashx);
new gift[128];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(gift, sizeof(gift),"* %s a primit un cadou! [150.000$]",name);
ProxDetector(10.0, playerid, gift,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
GameTextForPlayer(playerid, "~g~150,000$!", 5000, 1);
return 1;
}
if(cadou == 5)
{
GivePlayerCash(playerid, 200000);
Update(playerid, pCashx);
PlayerInfo[playerid][pGPoints] -= 3;
Update(playerid, pGPointsx);
new gift[128];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(gift, sizeof(gift),"* %s a primit un cadou! [200.000$]",name);
ProxDetector(10.0, playerid, gift,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
GameTextForPlayer(playerid, "~g~200,000$!", 5000, 1);
return 1;
}
if(cadou == 6)
{
PlayerInfo[playerid][pExp] += 1;
Update(playerid, pRP);
PlayerInfo[playerid][pGPoints] -= 3;
Update(playerid, pGPointsx);
new gift[128];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(gift, sizeof(gift),"* %s a primit un cadou! [+1 Respect Points]",name);
ProxDetector(10.0, playerid, gift,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
GameTextForPlayer(playerid, "~g~1 Respect points", 5000, 1);
return 1;
}
if(cadou == 7)
{
PlayerInfo[playerid][pExp] += 1;
Update(playerid, pRP);
PlayerInfo[playerid][pGPoints] -= 3;
Update(playerid, pGPointsx);
new gift[128];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(gift, sizeof(gift),"* %s a primit un cadou! [+1 Respect Points]",name);
ProxDetector(10.0, playerid, gift,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
GameTextForPlayer(playerid, "~g~1 Respect points", 5000, 1);
return 1;
}
if(cadou == 8)
{
PlayerInfo[playerid][pExp] += 2;
Update(playerid, pRP);
PlayerInfo[playerid][pGPoints] -= 3;
Update(playerid, pGPointsx);
new gift[128];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(gift, sizeof(gift),"* %s a primit un cadou! [+2 Respect Points]",name);
ProxDetector(10.0, playerid, gift,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
GameTextForPlayer(playerid, "~g~2 Respect points", 5000, 1);
return 1;
}
if(cadou == 9)
{
GivePlayerCash(playerid, 125000);
Update(playerid, pCashx);
PlayerInfo[playerid][pGPoints] -= 3;
Update(playerid, pGPointsx);
new gift[128];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(gift, sizeof(gift),"* %s a primit un cadou! [125.000$]",name);
ProxDetector(10.0, playerid, gift,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
GameTextForPlayer(playerid, "~g~125,000$!", 5000, 1);
return 1;
}
if(cadou == 10)
{
PlayerInfo[playerid][pRob] += 2;
PlayerInfo[playerid][pGPoints] -= 3;
Update(playerid, pGPointsx);
Update(playerid, pRobx);
new gift[128];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(gift, sizeof(gift),"* %s a primit un cadou! [+2 Rob Points]",name);
ProxDetector(10.0, playerid, gift,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
GameTextForPlayer(playerid, "~g~1 Rob points", 5000, 1);
return 1;
}
if(cadou == 11)
{
PlayerInfo[playerid][pPPoints] += 1;
PlayerInfo[playerid][pGPoints] -= 3;
Update(playerid, pGPointsx);
Update(playerid, pPPointsx);
new gift[128];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(gift, sizeof(gift),"* %s a primit un cadou! [+1 Premium Points]",name);
ProxDetector(10.0, playerid, gift,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
GameTextForPlayer(playerid, "~g~1 Premium points", 5000, 1);
return 1;
}
if(cadou == 12)
{
PlayerInfo[playerid][pRob] += 1;
PlayerInfo[playerid][pGPoints] -= 3;
Update(playerid, pGPointsx);
Update(playerid, pRobx);
new gift[128];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(gift, sizeof(gift),"* %s a primit un cadou! [+1 Rob Points]",name);
ProxDetector(10.0, playerid, gift,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
GameTextForPlayer(playerid, "~g~1 Rob points", 5000, 1);
return 1;
}
if(cadou == 13)
{
GivePlayerCash(playerid, 175000);
Update(playerid, pCashx);
PlayerInfo[playerid][pGPoints] -= 3;
Update(playerid, pGPointsx);
new gift[128];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(gift, sizeof(gift),"* %s a primit un cadou! [175.000$]",name);
ProxDetector(10.0, playerid, gift,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
GameTextForPlayer(playerid, "~g~175,000$!", 5000, 1);
return 1;
}
if(cadou == 14)
{
if(PlayerInfo[playerid][pFpunish] > 10)
{
PlayerInfo[playerid][pFpunish] -= 10;
PlayerInfo[playerid][pGPoints] -= 3;
Update(playerid, pGPointsx);
Update(playerid, pFpunishx);
new gift[128];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(gift, sizeof(gift),"* %s a primit un cadou! [Clear 10 FPunish]",name);
ProxDetector(10.0, playerid, gift,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
GameTextForPlayer(playerid, "~g~-10 FPunish", 5000, 1);
return 1;
}
else
{
PlayerInfo[playerid][pFpunish] += 20;
PlayerInfo[playerid][pGPoints] -= 3;
Update(playerid, pGPointsx);
Update(playerid, pFpunishx);
new gift[128];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(gift, sizeof(gift),"* %s a primit un cadou! [Clear 20 FPunish]",name);
ProxDetector(10.0, playerid, gift,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
GameTextForPlayer(playerid, "~g~-20 FPunish", 5000, 1);
return 1;
}
}
}
else
{
SCM(playerid, -1, "Nu detii 3 GPoints!");
return 1;
}
}
else
{
SCM(playerid, -1, "Nu esti la spawn civili!");
return 1;
}
}
return 1;
}
Question
PhaRaoH.
Am si eu comanda /getgift.
Aceasta este facuta pe pGPoints...
Doresc sa scot pgpoints si in locul acestora sa bag un timp.Adica comanda acum poate fi folosita atunci cand ai acele pGPoints, si vreau sa o poti folosii odata la 3 ore.Ma puteti ajuta?
CMD:getgift(playerid, params[]) { if(IsPlayerConnected(playerid)) { if(PlayerToPoint(5.0, playerid, 1713.8951,-1847.7421,13.5709)) { if(PlayerInfo[playerid][pGPoints] >= 3) { new cadou = random(9)+2; if(cadou == 1) { GivePlayerCash(playerid, 25000); Update(playerid, pCashx); PlayerInfo[playerid][pGPoints] -= 3; Update(playerid, pGPointsx); new gift[128]; new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(gift, sizeof(gift),"* %s a primit un cadou! [25.000$]",name); ProxDetector(10.0, playerid, gift,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW); GameTextForPlayer(playerid, "~g~25,000$!", 5000, 1); return 1; } if(cadou == 2) { GivePlayerCash(playerid, 50000); PlayerInfo[playerid][pGPoints] -= 3; Update(playerid, pGPointsx); Update(playerid, pCashx); GameTextForPlayer(playerid, "~g~50,000$!", 5000, 1); new gift[128]; new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(gift, sizeof(gift),"* %s a primit un cadou! [50.000$]",name); ProxDetector(10.0, playerid, gift,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW); return 1; } if(cadou == 3) { GivePlayerCash(playerid, 100000); PlayerInfo[playerid][pGPoints] -= 3; Update(playerid, pGPointsx); Update(playerid, pCashx); new gift[128]; new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(gift, sizeof(gift),"* %s a primit un cadou! [100.000$]",name); ProxDetector(10.0, playerid, gift,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW); GameTextForPlayer(playerid, "~g~100,000$!", 5000, 1); return 1; } if(cadou == 4) { GivePlayerCash(playerid, 150000); PlayerInfo[playerid][pGPoints] -= 3; Update(playerid, pGPointsx); Update(playerid, pCashx); new gift[128]; new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(gift, sizeof(gift),"* %s a primit un cadou! [150.000$]",name); ProxDetector(10.0, playerid, gift,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW); GameTextForPlayer(playerid, "~g~150,000$!", 5000, 1); return 1; } if(cadou == 5) { GivePlayerCash(playerid, 200000); Update(playerid, pCashx); PlayerInfo[playerid][pGPoints] -= 3; Update(playerid, pGPointsx); new gift[128]; new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(gift, sizeof(gift),"* %s a primit un cadou! [200.000$]",name); ProxDetector(10.0, playerid, gift,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW); GameTextForPlayer(playerid, "~g~200,000$!", 5000, 1); return 1; } if(cadou == 6) { PlayerInfo[playerid][pExp] += 1; Update(playerid, pRP); PlayerInfo[playerid][pGPoints] -= 3; Update(playerid, pGPointsx); new gift[128]; new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(gift, sizeof(gift),"* %s a primit un cadou! [+1 Respect Points]",name); ProxDetector(10.0, playerid, gift,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW); GameTextForPlayer(playerid, "~g~1 Respect points", 5000, 1); return 1; } if(cadou == 7) { PlayerInfo[playerid][pExp] += 1; Update(playerid, pRP); PlayerInfo[playerid][pGPoints] -= 3; Update(playerid, pGPointsx); new gift[128]; new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(gift, sizeof(gift),"* %s a primit un cadou! [+1 Respect Points]",name); ProxDetector(10.0, playerid, gift,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW); GameTextForPlayer(playerid, "~g~1 Respect points", 5000, 1); return 1; } if(cadou == 8) { PlayerInfo[playerid][pExp] += 2; Update(playerid, pRP); PlayerInfo[playerid][pGPoints] -= 3; Update(playerid, pGPointsx); new gift[128]; new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(gift, sizeof(gift),"* %s a primit un cadou! [+2 Respect Points]",name); ProxDetector(10.0, playerid, gift,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW); GameTextForPlayer(playerid, "~g~2 Respect points", 5000, 1); return 1; } if(cadou == 9) { GivePlayerCash(playerid, 125000); Update(playerid, pCashx); PlayerInfo[playerid][pGPoints] -= 3; Update(playerid, pGPointsx); new gift[128]; new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(gift, sizeof(gift),"* %s a primit un cadou! [125.000$]",name); ProxDetector(10.0, playerid, gift,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW); GameTextForPlayer(playerid, "~g~125,000$!", 5000, 1); return 1; } if(cadou == 10) { PlayerInfo[playerid][pRob] += 2; PlayerInfo[playerid][pGPoints] -= 3; Update(playerid, pGPointsx); Update(playerid, pRobx); new gift[128]; new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(gift, sizeof(gift),"* %s a primit un cadou! [+2 Rob Points]",name); ProxDetector(10.0, playerid, gift,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW); GameTextForPlayer(playerid, "~g~1 Rob points", 5000, 1); return 1; } if(cadou == 11) { PlayerInfo[playerid][pPPoints] += 1; PlayerInfo[playerid][pGPoints] -= 3; Update(playerid, pGPointsx); Update(playerid, pPPointsx); new gift[128]; new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(gift, sizeof(gift),"* %s a primit un cadou! [+1 Premium Points]",name); ProxDetector(10.0, playerid, gift,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW); GameTextForPlayer(playerid, "~g~1 Premium points", 5000, 1); return 1; } if(cadou == 12) { PlayerInfo[playerid][pRob] += 1; PlayerInfo[playerid][pGPoints] -= 3; Update(playerid, pGPointsx); Update(playerid, pRobx); new gift[128]; new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(gift, sizeof(gift),"* %s a primit un cadou! [+1 Rob Points]",name); ProxDetector(10.0, playerid, gift,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW); GameTextForPlayer(playerid, "~g~1 Rob points", 5000, 1); return 1; } if(cadou == 13) { GivePlayerCash(playerid, 175000); Update(playerid, pCashx); PlayerInfo[playerid][pGPoints] -= 3; Update(playerid, pGPointsx); new gift[128]; new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(gift, sizeof(gift),"* %s a primit un cadou! [175.000$]",name); ProxDetector(10.0, playerid, gift,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW); GameTextForPlayer(playerid, "~g~175,000$!", 5000, 1); return 1; } if(cadou == 14) { if(PlayerInfo[playerid][pFpunish] > 10) { PlayerInfo[playerid][pFpunish] -= 10; PlayerInfo[playerid][pGPoints] -= 3; Update(playerid, pGPointsx); Update(playerid, pFpunishx); new gift[128]; new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(gift, sizeof(gift),"* %s a primit un cadou! [Clear 10 FPunish]",name); ProxDetector(10.0, playerid, gift,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW); GameTextForPlayer(playerid, "~g~-10 FPunish", 5000, 1); return 1; } else { PlayerInfo[playerid][pFpunish] += 20; PlayerInfo[playerid][pGPoints] -= 3; Update(playerid, pGPointsx); Update(playerid, pFpunishx); new gift[128]; new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(gift, sizeof(gift),"* %s a primit un cadou! [Clear 20 FPunish]",name); ProxDetector(10.0, playerid, gift,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW); GameTextForPlayer(playerid, "~g~-20 FPunish", 5000, 1); return 1; } } } else { SCM(playerid, -1, "Nu detii 3 GPoints!"); return 1; } } else { SCM(playerid, -1, "Nu esti la spawn civili!"); return 1; } } return 1; }1 answer to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now