01.10.2010, 11:58
how i can make so that V.I.P players can use /goto?
dcmd_goto(playerid,params[])
{
if(pInfo[playerid][VIP] == 1)
{
//code
}
else return SendClientMessage(playerid,color,"You must be VIP!");
return 1;
}
if(strcmp(cmdtext,"/goto",true) == 0)
{
if(pInfo[playerid][VIP] == 1)
{
//code
}
else return SendClientMessage(playerid,color,"You must be VIP!");
return 1;
}
CMD:goto(playerid,params[])
{
if(pInfo[playerid][VIP] == 1)
{
//code
}
else return SendClientMessage(playerid,color,"You must be VIP!");
return 1;
}
//etc
dcmd_goto(playerid,params[])
{
if(IsPlayerVipMember(playerid))
{
//code
}
else return SendClientMessage(playerid,color,"You must be VIP!");
return 1;
}
dcmd_goto(playerid,params[])
{
new id = strval(params);
if(IsPlayerVipMember(playerid))
{
new Float:x,Float:y,Float:z; GetPlayerPos(id,x,y,z);
SetPlayerPos(id,x+1,y+1,z);
}
else return SendClientMessage(playerid,color,"You must be VIP to use that command.");
return 1;
}