#define TEAM_COP 1
and a
if(strcmp("/cop coper", cmdtext, true, 10) == 0)
{
gTeam blah blah blah TEAM_COP
Setplayerpos Blah
Weapons Blah Blah
ect
?new CurrentTopPlayer;
if ( strcmp(cmdtext, "/TopPlayer", true) == 0 ) {
new pScore;
for ( new i = 0; i < MAX_PLAYERS; i++ ) {
if ( IsPlayerConnected(i) ) {
pScore = GetPlayerScore(i);
if ( pScore > CurrentTopPlayer ) {
CurrentTopPlayer = i;
}
}
}
new Str[50],
pName[25];
GetPlayerName(CurrentTopPlayer, pName, sizeof pName);
format(Str, sizeof String, "The Top Player Is: %s", pName);
SendClientMessage(playerid, 0x00ff00ff, Str);
return 1;
}
but should work ?
if (jobRank[playerid] == 1)
// rank 1, constable
else if (jobRank[playerid] == 2)
// rank 2, inspector
new PlayerRank[MAX_PLAYERS];
if ( strcmp(cmdtext, "/MyRank", true) == 0 ) {
new Rank[25];
for ( new i = 0; i < 2; i++ ) { // 2 being the number of ranks
if ( PlayerRank[playerid] == 1 ) {
Rank = "Commander !";
} else if ( PlayerRank[playerid] == 2 ) {
Rank = "General !";
} else {
Rank = "Nothing !";
}
}
new Str[50];
format(Str, sizeof String, "Your Rank Is: %s", Rank);
SendClientMessage(playerid, 0x00ff00ff, Str);
return 1;
}
|
if(strcmp("/cop coper", cmdtext, true, 10) == 0) |