If player is RCON admin, give jetpack. -
Ihsan_Cingisiz - 26.05.2010
How can i do a if(strcmp......
/jetpack for if player is admin?
Who can make the script for me?
Re: If player is RCON admin, give jetpack. -
Backwardsman97 - 26.05.2010
Script request thread.
Re: If player is RCON admin, give jetpack. -
Bomber - 26.05.2010
pawn Код:
if(strcmp(cmd, "/jetpack", true) == 0) {
if(IsPlayerAdmin(playerid))
{
SendClientMessage(playerid,0xFF0000AA,"You can't use this command.");
return 1;
}
SendClientMessage(playerid, 0xFF7F50AA, "You have jetpack now!");
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USEJETPACK);
return 1;
}
Re: If player is RCON admin, give jetpack. -
NewTorran - 26.05.2010
Less Lines:
pawn Код:
if(strcmp(cmd, "/jetpack", true) == 0) {
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFF0000AA,"You can't use this command.");
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USEJETPACK); SendClientMessage(playerid, 0xFF7F50AA, "You have jetpack now!");
return 1;
}
Re: If player is RCON admin, give jetpack. -
Mechscape - 26.05.2010
Quote:
Originally Posted by Bomba || ❶❸❸❼
pawn Код:
if(strcmp(cmd, "/jetpack", true) == 0) { if(IsPlayerAdmin(playerid)) { SendClientMessage(playerid,0xFF0000AA,"You can't use this command."); return 1; } SendClientMessage(playerid, 0xFF7F50AA, "You have jetpack now!"); SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USEJETPACK); return 1; }
|
You wrong. This will be, you logged RCON and typing /jetpack, then you get You can't use this command!
Код:
if(strcmp(cmd, "/jetpack", true) == 0) {
if(!IsPlayerAdmin(playerid))
{
SendClientMessage(playerid,0xFF0000AA,"You can't use this command.");
return 1;
}
SendClientMessage(playerid, 0xFF7F50AA, "You have jetpack now!");
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USEJETPACK);
return 1;
}
Re: If player is RCON admin, give jetpack. -
Bomber - 26.05.2010
No, you wrong, test it.
Re: If player is RCON admin, give jetpack. -
Mechscape - 26.05.2010
Quote:
Originally Posted by Bomba || ❶❸❸❼
No, you wrong, test it.
|
tested.
Your code failed.
Says You can't use this command
(In RCON admin)
This code work's.
Код:
if(strcmp(cmd, "/jetpack", true) == 0) {
if(!IsPlayerAdmin(playerid))
{
SendClientMessage(playerid,0xFF0000AA,"You can't use this command.");
return 1;
}
SendClientMessage(playerid, 0xFF7F50AA, "You have jetpack now!");
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USEJETPACK);
return 1;
}
Re: If player is RCON admin, give jetpack. -
Lewwy - 26.05.2010
Quote:
Originally Posted by Bomba || ❶❸❸❼
No, you wrong, test it.
|
You were wrong because of your check, you didn't put the ! before IsPlayerAdmin.
Re: If player is RCON admin, give jetpack. -
bartje01 - 26.05.2010
Baked banana. You are right indeed. He has to post it in the script request thread. But I must say that almost nobody will help you at there.
Re: If player is RCON admin, give jetpack. -
Bomber - 26.05.2010
Yeah, my copy fail

Lol xD