06.09.2011, 13:20
now i need ahelp from you guys i made this its work fine and all i need that i cant define 2 IDS in OnPlayerEnterCheckpoint When i use giveplayerid and use it under its only give me ID 0 in not anything else just (0) help me with this guys
Код:
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; }