ticket command
#1





dcmd_ticket(playerid, params[])
{
if (strlen(params))
{
id = strval(params);
if (IsPlayerConnected(id) && (gTeam[playerid] == TEAM_COPS) && (gTeam[playerid] == TEAM_CIA) && (GetDistanceBetweenPlayers( playerid, id) < 70.0 ) && (playercolor[id] == COLOR_YELLOW))
{
GivePlayerMoney(id, -700);
GivePlayerMoney(playerid, 700);
SetPlayerScore(playerid, GetPlayerScore( playerid ) +1 );
SendClientMessage(id, 0x00FF00AA, "You have been Ticketed");
SendClientMessage(playerid, 0x00FF00AA, "Criminal ticketed. Good Job");
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "No ticketable player nearby");
}
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/ticket <playerid>\"");
}
return 1;
}
Reply
#2

this is my command and when i type ticket i sais me no ticketableplayer nearby
Reply
#3

Shot in the dark, but I'm guessing this is not code you wrote yourself. But anyway, the playerid you typed, either doesn't exist (player's not connected), the player is a cop, the player is the CIA, the player is not close enough, or their playercolor is yellow. Your else isn't exactly that descriptive. You'll have to add extra cases to test where the problem originates from and figure out why.

Second, next time, please use [ pawn ] tags and just modify your post, don't just reply to it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)