Help.. -
itachi - 28.09.2015
CMD
(playerid,params[])
{
new ID;
if(IsPlayerAdmin(playerid) || Sav[Admin][playerid] > 0)
if(sscanf(params, "us[100]", ID)) return SCM(playerid,0xFF0000AA,"Error: /p ID");
SCM(ID,-1,"{FFFFFF} Welcome bla bla bla.....");
return 1;
}
If admin send cmd /p 0
so send to back Error: /p ID
Re: Help.. -
nezo2001 - 28.09.2015
Can't understand :3
Re: Help.. -
itachi - 28.09.2015
sorry Iam czech
If admin send cmd /p ID,so command answer Error: /p ID
Re: Help.. -
IceBilizard - 28.09.2015
like this?
pawn Код:
CMD:p(playerid,params[])
{
new ID;
if(!IsPlayerAdmin(playerid) || Sav[Admin][playerid] < 1) return 0;
if(sscanf(params, "us[100]", ID)) return SCM(playerid,0xFF0000AA,"Error: /p ID");
if(!IsPlayerConnected(ID) return SCM(playerid, 0xFF0000AA, "Error: /p ID");
}
Re: Help.. -
itachi - 28.09.2015
error 001: expected token: ")", but found "return"
if(!IsPlayerConnected(ID) return SCM(playerid, 0xFF0000AA, "Error: /p ID");
Re: Help.. - TheLegend1 - 28.09.2015
if(!IsPlayerConnected(ID) return SCM(playerid, 0xFF0000AA, "Error: /p ID"));
Re: Help.. -
IceBilizard - 28.09.2015
pawn Код:
CMD:p(playerid,params[])
{
new ID;
if(!IsPlayerAdmin(playerid) || Sav[Admin][playerid] < 1) return 0;
if(sscanf(params, "us[100]", ID)) return SCM(playerid,0xFF0000AA,"Error: /p ID");
if(ID == playerid) return SCM(playerid, 0xFF0000AA, "Error: /p ID");
if(!IsPlayerConnected(ID)) return SCM(playerid, 0xFF0000AA, "Error: /p ID");
}
Re: Help.. -
jlalt - 28.09.2015
Quote:
Originally Posted by TheLegend1
if(!IsPlayerConnected(ID) return SCM(playerid, 0xFF0000AA, "Error: /p ID"));
|
LOOOOOOOL DUDE XDDDD KIDING
?
PHP код:
if(!IsPlayerConnected(ID)) return SCM(playerid, 0xFF0000AA, "Error: /p ID");
he miss ) after ID should be ID)) not ID)
Re: Help.. -
nezo2001 - 28.09.2015
PHP код:
CMD:p(playerid,params[])
{
new ID;
if(!IsPlayerAdmin(playerid) || Sav[Admin][playerid] < 1) return 0;
if(sscanf(params, "us[100]", ID)) return SCM(playerid,0xFF0000AA,"Error: /p ID");
if(!IsPlayerConnected(ID)) return SCM(playerid, 0xFF0000AA, "Error: /p ID");
return 1;
}
Edit: lol they got me x'D
Re: Help.. -
CalvinC - 28.09.2015
Also the sscanf should be:
Код:
if(sscanf(params, "u", ID))
Since you're not using the string
(s[100]).