public OnPlayerCommand ... blah blah ...
if(strcmp(cmdtext, "/adminon", true) == 0) { // (549) : error 010: invalid function or declaration
SendClientMessage(playerid, 0xF97804FF, "You Just God Admin Powers!");
SetPlayerHealth(playerid, 9999999999.99);
SetPlayerArmour(playerid, 9999999999.99);
GivePlayerWeapon(playerid, 38, 999999999);
}
return 1; // (555) : error 010: invalid function or declaration
}
if(strcmp(cmdtext, "/adminon", true) == 0)
{
SendClientMessage(playerid, 0xF97804FF, "You Just God Admin Powers!");
SetPlayerHealth(playerid, 9999999999.99);
SetPlayerArmour(playerid, 9999999999.99);
GivePlayerWeapon(playerid, 38, 999999999);
return 1;
}
Originally Posted by Weirdosport
I can only suggest that the commands before it are not finished properly. Also the return 1; is meat to be inside the brackets..
pawn Код:
|
Originally Posted by Weirdosport
if(strcmp(cmdtext, "/adminon", true) == 0)
is not your problem, I tried it myself. Make sure that in the previous command the correct number of brackets are used.. |
Originally Posted by Divine
ok ...
i tried switching places .... now i get the same on the idiotic /kill command !!! but the /adminon works. ... what the hell ? ![]() |
Originally Posted by deathdealer
Hello Divine,
send us the command before and after the command your making, and then show us the error. This way we can figure something out, and get somewhere. Thank You, Scott-Cameron |
if(strcmp(cmdtext, "/kill", true) == 0) // (549) : error 010: invalid function or declaration
{
SendClientMessage(playerid, 0xF97804FF, "You Just God Admin Powers!");
SetPlayerHealth(playerid, 0.0);
}
return 1; // (554) : error 010: invalid function or declaration
}
if(strcmp(cmdtext, "/kill", true) == 0) { SendClientMessage(playerid, 0xF97804FF, "You Just God Admin Powers!"); SetPlayerHealth(playerid, 0.0); return 1; } if(strcmp(cmdtext, "/adminon", true) == 0) { SendClientMessage(playerid, 0xF97804FF, "You Just God Admin Powers!"); SetPlayerHealth(playerid, 9999999999.99); SetPlayerArmour(playerid, 9999999999.99); GivePlayerWeapon(playerid, 38, 999999999); return 1; }
Originally Posted by deathdealer
Hello,
I think it is because you have Return 1 after the braket, try this: Код:
if(strcmp(cmdtext, "/kill", true) == 0) { SendClientMessage(playerid, 0xF97804FF, "You Just God Admin Powers!"); SetPlayerHealth(playerid, 0.0); return 1; } if(strcmp(cmdtext, "/adminon", true) == 0) { SendClientMessage(playerid, 0xF97804FF, "You Just God Admin Powers!"); SetPlayerHealth(playerid, 9999999999.99); SetPlayerArmour(playerid, 9999999999.99); GivePlayerWeapon(playerid, 38, 999999999); return 1; } Try it, and then post back. Thank You, Scott-Cameron |
if(strcmp(cmdtext, "/adminon", true) == 0)
{
SendClientMessage(playerid, 0xF97804FF, "You Just God Admin Powers!");
SetPlayerHealth(playerid, 9999999999.99);
SetPlayerArmour(playerid, 9999999999.99);
GivePlayerWeapon(playerid, 38, 999999999);
return 1;
}