Help me!
#1


hello to everyone, I have created a script but works only for the player with id 0, why?

here's the script:

on top:
new BOOM[MAX_PLAYERS];

ongamemode:
SetTimer("killcar", 1000, 1);

onplayercommandtext:
if (strcmp("/boom", cmdtext, true, 10) == 0)
{
BOOM[playerid] = 1;
SendClientMessage(playerid, GREEN, "Per disattivare il comando /boff");
return 1;
}


if(strcmp(cmdtext,"/boff",true)==0)
{
BOOM[playerid] = 0;
SendClientMessage(id, yellow, "Comando disattivato");
return 1;
}

at the end:
forward killcar(playerid);
public killcar(playerid)
{
if(BOOM[playerid] == 1)
{
SetVehicleHealth(GetPlayerVehicleID(playerid) ,3);
SetTimer("killcar2", 4000, 1);
return 1;
}
}

forward killcar2(playerid);
public killcar2(playerid)
{
SetVehicleHealth(GetPlayerVehicleID(playerid) ,1000);
SetTimer("killcar", 1000, 1);
return 1;
}


sorry for English disgusting but I use the translator of ******, I am Italian XD

Reply


Messages In This Thread
Help me! - by zofa - 08.11.2008, 13:30
Re: Help me! - by pspleo - 08.11.2008, 13:34
Re: Help me! - by zofa - 08.11.2008, 17:43
Re: Help me! - by Audi_Quattrix - 17.06.2012, 12:09

Forum Jump:


Users browsing this thread: 1 Guest(s)