[HELP ]CMD - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP ]CMD (
/showthread.php?tid=498439)
[HELP ]CMD -
PinkyDoze - 03.03.2014
pawn Код:
CMD:setprem(playerid,params[])
{
if(PlayerInfo[playerid][AdminLevel] < 5) return SendClientMessage(playerid,YELLOW,"» Error:You must be an administrator to use this command");
static id,prem;
if(sscanf(params,"ui",id,prem)) return SendClientMessage(playerid,YELLOW,"USAGE:/setprem <id> <premium> 1 = Gold | 2 = Platinium");
if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid,YELLOW,"» Error: That player isn't connected!");
if(prem > 2 && prem < 0) return SendClientMessage(playerid,YELLOW,"Maximum premium level is 2!");
if(prem == 1)
{
SendClientMessage(id,"» Administrator %d has setted youre VIP to Gold",playerid);
}
else
{
SendClientMessage(id,"» Administrator %d has setted youre VIP to None.",playerid);
SetPlayerArmour(id,0);
}
PlayerInfo[id][Pvip] = prem;
return 1;
}
help me i get this errors
pawn Код:
error 035: argument type mismatch (argument 2)
error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.
Re: [HELP ]CMD -
Keyhead - 03.03.2014
pawn Код:
CMD:setprem(playerid,params[])
{
if(PlayerInfo[playerid][AdminLevel] < 5) return SendClientMessage(playerid,YELLOW,"» Error:You must be an administrator to use this command");
static id,prem;
new string[128];
if(sscanf(params,"ui",id,prem)) return SendClientMessage(playerid,YELLOW,"USAGE:/setprem <id> <premium> 1 = Gold | 2 = Platinium");
if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid,YELLOW,"» Error: That player isn't connected!");
if(prem > 2 && prem < 0) return SendClientMessage(playerid,YELLOW,"Maximum premium level is 2!");
if(prem == 1)
{
format(string, 128, "» Administrator %d has setted youre VIP to Gold", playerid);
SendClientMessage(id,-1,string);
}
else
{
format(string, 128, "» Administrator %d has setted youre VIP to Gold", playerid);
SendClientMessage(id,-1,string);
}
PlayerInfo[id][Pvip] = prem;
return 1;
}
Try this.
Re: [HELP ]CMD -
PinkyDoze - 03.03.2014
works thanx <3