02.01.2017, 18:06
I am trying to make a cmds for this vip system but i dont know how so any help i just got the command to make vip here is it:
PHP код:
COMMAND:makevip(playerid, params[])
{
if(!IsPlayerAdmin(playerid))
return 0;
new otherID, value;
if(sscanf(params, "ud", otherID, value))
{
Usage(playerid, "makevip <playerid> <level>");
}
else
{
if(!isConnected(otherID))
{
Server(playerid, "That player isn't logged in!");
return 1;
}
switch(value)
{
case 1:
{
Player[otherID][vipLevel] = 1;
Player[otherID][vipExpires] = gettime() + 2592000;
showAchievements(otherID, "Congratulation, you're VIP now.", 50000);
}
case 2:
{
Player[otherID][vipLevel] = 2;
Player[otherID][vipExpires] = gettime() + 2592000;
showAchievements(otherID, "Congratulation, you're VIP now.", 50000);
}
case 3:
{
Player[otherID][vipLevel] = 3;
Player[otherID][vipExpires] = gettime() + 2592000;
showAchievements(otherID, "Congratulation, you're VIP now.", 50000);
}
default:
{
Server(playerid, "Please input between 1 - 3.");
}
}
saveStats(otherID);
}
return 1;
}