SA-MP Forums Archive
why this not work - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: why this not work (/showthread.php?tid=592416)



why this not work - LovelySoomro - 24.10.2015

public OnVehicleDeath(vehicleid, killerid)
{
if(gTeam[killerid] == TEAM_GREEN)
if(AccInfo[killerid][tdm] == 1)
{
if(vehicleid == terroristheli)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(GetPlayerTeam(i) == TEAM_GREEN)
{
SendClientMessage(i,LIGHTBLUE,"{0498FB}~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
SendClientMessage(i,LIGHTBLUE,"{00bfff}[NGP]: {FFFF00}Cops Save The helicopter every Cops team mate Get 5 Score 5000$ Rs/5!");
SendClientMessage(i,LIGHTBLUE,"{0498FB}~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
AccInfo[i][rupees] +=5;
GameTextForPlayer(i,"~y~5 Score~n~~g~5000$~n~~y~Rs/5",2000,1);
SetPlayerScore(i,GetPlayerScore(i)+5);
GivePlayerMoney(i,5000);
SetVehicleToRespawn(terroristheli);
}
}
}
}
return 1;
}



Re: why this not work - Dusan01 - 24.10.2015

what plese for code use code tags, and pictures we cant see and idk wha is problm here, add debug(print) at that code and see where it stucks...


Re: why this not work - LovelySoomro - 24.10.2015

Quote:

public OnVehicleDeath(vehicleid, killerid)
{
if(gTeam[killerid] == TEAM_GREEN)
if(AccInfo[killerid][tdm] == 1)
{
if(vehicleid == terroristheli)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(GetPlayerTeam(i) == TEAM_GREEN)
{
SendClientMessage(i,LIGHTBLUE,"{0498FB}~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
SendClientMessage(i,LIGHTBLUE,"{00bfff}[NGP]: {FFFF00}Cops Save The helicopter every Cops team mate Get 5 Score 5000$ Rs/5!");
SendClientMessage(i,LIGHTBLUE,"{0498FB}~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
AccInfo[i][rupees] +=5;
GameTextForPlayer(i,"~y~5 Score~n~~g~5000$~n~~y~Rs/5",2000,1);
SetPlayerScore(i,GetPlayerScore(i)+5);
GivePlayerMoney(i,5000);
SetVehicleToRespawn(terroristheli);
}
}
}
}
return 1;
}

when cops destroy the heli cops dont get score rupees and cash And also thats message


Re: why this not work - LovelySoomro - 24.10.2015

plz help


Re : why this not work - StreetRP - 24.10.2015

Explain more


Re: why this not work - ATGOggy - 24.10.2015

Missed a bracket in the first if.