public OnPlayerEnterCheckpoint(playerid)
{
new string[256];
if(getCheckpointType(playerid) == 18 && getCheckpointType(playerid) == 18)
{
if(PlayerDragged[playerid] == 1)
{
new swatname[24];
new wantedsuspect[24];
new giveplayerid;
GetPlayerName(giveplayerid,swatname,24);
GetPlayerName(playerid,wantedsuspect,24);
SendClientMessage(playerid, 0xA9A9A9AA, "|_Los Santos Police Department_|");
format(string, sizeof(string), "You have given %s(%d) to LSPD and he is been detained by Police",wantedsuspect,playerid);
SendClientMessage(giveplayerid,0x00C7FFAA,string);
format(string, sizeof(string), "Swat-Member %s(%d) Has Handed You in LSPD and you been detained by PD Police",swatname,giveplayerid);
SendClientMessage(playerid,0x00C7FFAA,string);
new rnd;
rnd = random(sizeof (ArrestedSpawn));
SetPlayerPos(playerid, ArrestedSpawn[rnd][0], ArrestedSpawn[rnd][1], ArrestedSpawn[rnd][2]);
SetPlayerFacingAngle(playerid, ArrestedSpawn[rnd][3]);
SetPlayerInterior(playerid,6);
format(string, sizeof(string), "Wanted suspect %s(%d) has handed by Swat-Member %s(%d) into LSPD and has been detained by police",wantedsuspect,playerid,swatname,giveplayerid);
SendClientMessageToAll(0x00C7FFAA, string);
SendClientMessage(playerid,0x00C7FFAA,"You will be auto-released from jail or a Police Officer/Jail Turnkey can release you early");
format(string, sizeof(string), "Wanted suspect %s(%d) has handed by Swat-Member %s(%d) into LSPD and has been detained by police",wantedsuspect,playerid,swatname,giveplayerid);
printf("%s", string);
Jailed[playerid] =1;
StoleCopCarRecent[playerid] =0;
cannotescapejail[playerid] =0;
ResetPlayerWeapons(playerid);
PlayerDragged[playerid] =0;
JailTime[playerid] =60;
JailTimeServed[playerid] =0;
SetPlayerWantedLevel(playerid,0);
oscore = GetPlayerScore(giveplayerid);
SetPlayerScore(playerid, giveplayerid +1);
arrestsrank[giveplayerid] +=1;
return 1;
}
|
Your creating the variable ( new giveplayerid; ), but are never putting any data in it. New variables always default to 0!
You need to, put something in giveplayerid! |
|
What is "giveplayerid" supposed to be? I don't see any hint of what it should be...
|