02.02.2012, 14:47
Hello,
I have a little problem here :\
i created random jail spawns but i donot know how to attach them to my arrest cmd
These are the jail random spawns
And my arrest cmd
Thankx.
I have a little problem here :\
i created random jail spawns but i donot know how to attach them to my arrest cmd
Code:
new Float:JAIL[6][4] = {
{1845.7461,-2751.6826,42.3531,93.6718},
{1846.0171,-2750.6497,42.3531,40.0913},
{1846.9832,-2750.5295,42.3531,327.3972},
{1848.2495,-2751.2966,42.3531,276.3235},
{1847.9565,-2752.4670,42.3469,225.5630},
{1846.6447,-2751.9783,42.3531,162.8957}
};
And my arrest cmd
Code:
COMMAND:arrest(playerid, params[])
{
stunedid = strval(params);
if(gTeam[playerid] == TEAM_ENFORCERS)
{
if (strval(params)>0)
{
if (Stuned[stunedid] == 1)
{
SetPlayerScore(stunedid,GetPlayerScore(stunedid)-10);
GivePlayerMoney(stunedid,-1000);
SetPlayerPos(stunedid,JAIL);
SetCameraBehindPlayer(stunedid);
SendClientMessage(stunedid,COLOR_GREY,"* You have been arrested! You lost 10000$ and 10 Score");
GameTextForPlayer(stunedid,"~r~ARRESTED!",3000,3);
SetPlayerScore(playerid,GetPlayerScore(playerid)+10);
GivePlayerMoney(playerid,10000);
SendClientMessage(playerid,COLOR_GREY,"* You arrested Criminal and received 10000$ and 10 Score");
}
else SendClientMessage(playerid, COLOR_RED, "ERROR: That player is not stunned!");
}
else SendClientMessage(playerid, COLOR_RED, "Usage: /arrest <stuned-playerid>");
}
else SendClientMessage(playerid, COLOR_RED, "ERROR: Only Enforcers can use this command!");
return 1;
}



Edit: Thanks for noticing drebin