warning: exception(playerped)
#1

hee all,

lately i added a new mission to my script,
but sometimes when a player enters the mission car the player gets the warning: excetion(playerped)

here's the code

if(police[playerid]==0)
{
new string[128], PlayerNamee[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerNamee, sizeof(PlayerNamee));
SetVehicleToRespawn(Transportcar);
format(string, sizeof(string), "%s robbed the %s and won $1500 and 1 exp", PlayerNamee,VehNames[GetVehicleModel(Transportcar) - 400]);
SendClientMessageToAll(COLOR_GREEN, string);
format(string, sizeof(string), "%s is now mostwanted for 6 minutes, kill him and earn $500!", PlayerNamee);
SendClientMessageToAll(COLOR_GREEN, string);
SendClientMessageToAll(COLOR_GREEN, "In 3 minutes a Grand Theft Auto will start!");
format(string, sizeof(string), "~y~Winner!!! ~n~~n~You won: ~n~~b~$1500");
GameTextForPlayer(playerid, string, 8000, 3);
GivePlayerMoney(playerid, 1500);
experience[playerid] = (dUserINT(PlayerName(playerid)).("experience"));
rank1[playerid] = (dUserINT(PlayerName(playerid)).("rank"));
new name[MAX_PLAYER_NAME];
new Rank = rank1[playerid];
new Experience = experience[playerid];
GetPlayerName(playerid, name, sizeof(name));
new coordsstring[256];
if(experience[playerid]<rank1[playerid])
{
SendClientMessage(playerid, COLOR_GREEN,"_____________________________________ ___________");
format(coordsstring, sizeof(coordsstring),"*** %s ***",name);
SendClientMessage(playerid, COLOR_WHITE,coordsstring);
SendClientMessage(playerid, 0xFFFFFFFF, "you got +1 Experience.");
format(coordsstring, sizeof(coordsstring), "Experience:[%d+1]",Experience);
SendClientMessage(playerid, COLOR_WHITE,coordsstring);
SendClientMessage(playerid, COLOR_GREEN,"_____________________________________ ___________");
experience[playerid] = experience[playerid]+1;
udb_UserSetInt((PlayerName(playerid)),"experience" ,experience[playerid]);
}
else
{
SendClientMessage(playerid, COLOR_GREEN,"_____________________________________ ___________");
format(coordsstring, sizeof(coordsstring),"*** %s ***",name);
SendClientMessage(playerid, COLOR_WHITE,coordsstring);
SendClientMessage(playerid, 0xFFFFFFFF, "you got +1 Rank.");
format(coordsstring, sizeof(coordsstring), "Rank:[%d+1]",Rank);
SendClientMessage(playerid, COLOR_WHITE,coordsstring);
SendClientMessage(playerid, COLOR_GREEN,"_____________________________________ ___________");
rank1[playerid] = rank1[playerid]+1;
SetPlayerScore(playerid,rank1[playerid]);
udb_UserSetInt((PlayerName(playerid)),"rank",rank1[playerid]);
experience[playerid]=0;
udb_UserSetInt((PlayerName(playerid)),"experience" ,0);
}
mostwanted3[playerid] = (dUserINT(PlayerName(playerid)).("mostwanted3"));
dUserSetINT(PlayerName(playerid)).("mostwanted3",1 );
SetTimer("mostwantedcounter3",360000,0);
SetTimer("startgta", 180000, 0);
TransportGameTimeLeft = 0;
mapicontimer7 = SetTimer("mostwantedmapiconnnn",1000,1);
SetTimer("delayyyy", 500, 0);
IsTransportGameStarted = 0;
for(new i; i<Max_Players; i++)
{
GetVehicleParamsEx(Transportcar, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(Transportcar,engine,lights,alar m,1,bonnet,boot,0);
}
KillTimer(RoundTimer3);
KillTimer(Transporttimer);
PlayerInTransportVehicle = -1;
}

anyone got an idea?

thanks in advance,

Jop9888
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)