if (strcmp("/opengate", cmdtext, true, 10) == 0) { MoveObject(gate,1627.48156738,641.35876465,5.56952 858, 3.0); GameTextForPlayer(playerid, "~w~Gate opened, Welcome", 5000, 5); return 1; } if (strcmp("/closegate", cmdtext, true, 10) == 0) { MoveObject(gate,1627.47692871,641.25878906,13.8192 3294, 3.0); GameTextForPlayer(playerid, "~w~Gate close, Goodbye", 5000, 5); return 1; } |
You've just told us to make those 2 commands only for admin level 9 and 10, how could we now what's your admin variable? - an example would be the "pAdmin" from godfather mode.
|
if (strcmp("/opengate", cmdtext, true, 10) == 0) { if(AccInfo[playerid][Level] == 9 || AccInfo[playerid][Level] == 10) { MoveObject(gate,1627.48156738,641.35876465,5.56952 858, 3.0); GameTextForPlayer(playerid, "~w~Gate opened, Welcome", 5000, 5); return 1; } else { SendClientMessage(playerid, COLOR_HERE, "You are not allowed to use this commmand!"); return 1; } } if (strcmp("/closegate", cmdtext, true, 10) == 0) { if(AccInfo[playerid][Level] == 9 || AccInfo[playerid][Level] == 10) { MoveObject(gate,1627.47692871,641.25878906,13.8192 3294, 3.0); GameTextForPlayer(playerid, "~w~Gate close, Goodbye", 5000, 5); return 1; } else { SendClientMessage(playerid, COLOR_HERE, "You are not allowed to use this commmand!"); return 1; } }
if (strcmp("/opengate", cmdtext, true, 10) == 0)
{
if(AccInfo[playerid][Level] >= 9 )
{
MoveObject(gate,1627.48156738,641.35876465,5.56952 858, 3.0);
GameTextForPlayer(playerid, "~w~Gate opened, Welcome", 5000, 5);
return 1;
}
}
if (strcmp("/closegate", cmdtext, true, 10) == 0)
{
if(AccInfo[playerid][Level] >= 9 )
{
MoveObject(gate,1627.47692871,641.25878906,13.8192 3294, 3.0);
GameTextForPlayer(playerid, "~w~Gate close, Goodbye", 5000, 5);
return 1;
}
}
PHP код:
|