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;
}
CMD:weapon(playerid,params[])
{
If(Player[playerid][vipLevel] >= 1)
{
GivePlayerWeapon(playerid, 24, 500);
}
else
{
SendClientMessage(playerid, 0xF8F8F8FFF,"[ERROR]: you need to be VIP at-least to use this CMD.");
}
}
return 1;
}
I know that i am nub in scripting but did u forget ??
PHP код:
|
CMD:weapon(playerid,params[])
{
if(Player[playerid][vipLevel] >= 1)
{
GivePlayerWeapon(playerid, 24, 500);
}
else
{
SendClientMessage(playerid, 0xF8F8F8FFF,"[ERROR]: you need to be VIP at-least to use this CMD.");
}
return 1;
}
CMD:weapon(playerid, params[]) {
if(Player[playerid][vipLevel] < 1) return SendClientMessage(playerid, 0xF8F8F8FFF,"[ERROR]: you need to be VIP at-least to use this CMD.");
GivePlayerWeapon(playerid, 24, 500);
return 1;
}