06-02-2008, 07:28 PM
Hey all,
I have a question about my Anti Ship Kill script.
I have made a anti ship kill script.
Here is my script:
This is the begin of my, on player death callback.
But, if i do /kill on the ship, the server crashes and gives the windows foalt, dunno how to explane in english, becoase my windows is dutch
And here is my /kill script.
I hope you guys can help me
- Dimplex
I have a question about my Anti Ship Kill script.
I have made a anti ship kill script.
Here is my script:
Code:
public OnPlayerDeath(playerid, killerid, reason)
{
new playercash;
new killedplayer[MAX_PLAYER_NAME];
new string[256];
new oldlevel;
new newlevel;
new jailstring[90];
new killername[MAX_PLAYER_NAME];
playercash = GetPlayerMoney(playerid);
for(new j=0; j < MAX_SHIPZONE; j++) {
if(killerid == playerid) return SendClientMessage(playerid,COLOR_RED,"You killed your self on ship");
if(isPlayerInArea(playerid,ShipZone[j])) {
GetPlayerName(killerid, killername, sizeof(killername));
format(jailstring, sizeof(jailstring), "Newsmessage: %s has been jailed for Shipkilling", killername);
SendClientMessageToAll(COLOR_WHITE, string);
SetPlayerPos(killerid, 264.6288,77.5742,1001.0391);
SetTimer("ShipJailRelease",180000,0);//after 3 minutes
}
}
But, if i do /kill on the ship, the server crashes and gives the windows foalt, dunno how to explane in english, becoase my windows is dutch
And here is my /kill script.
Code:
if(strcmp(cmd, "/kill", true) == 0) {
SetPlayerHealth(playerid,0);
if(Variables[playerid][Registered]){
MyDeaths[playerid]++;
}
return 1;
}
I hope you guys can help me
- Dimplex