If you script well, little help
#1

Hey guys. I was trying to put a few codes into my gamemode but they keep giving errors. and i cant fix these stupid errors... can someone successfully put in these codes into the gamemode.... plz thanks

my gamemode==== http://pastebin.com/d29abc786


the codes:
1)anti team kill code


//ANTI TEAMKILL
public OnGameModeInit()
{
SetTimer("UpdateTeams", 1000, 1);
return 1;
}

forward UpdateTeams();
public UpdateTeams()
{
for(new i = 0; i<GetMaxPlayers(); i++)
{
if(gTeam[i] == 1) { SetPlayerTeam(playerid, 1); }
else if(gTeam[i] == 2) { SetPlayerTeam(playerid, 2); }
}
}

__________________________________________________ ___________________________


2) when person logs on/ logs off u get his ip
https://sampwiki.blast.hk/wiki/GetPlayerIp This...


or

// top of your gamemode
forward SettingPlayerTeam();
//OnPlayerConnect
SetTimerEx("SettingPlayerTeam",10,1,"d",playerid);
//Bottom of your script
public SettingPlayerTeam()
{
for(new playerid; playerid < 200; playerid++)
SetPlayerTeam(playerid, gTeam[playerid]);
return 1;
}





if anyone could help i would be greatly appriciated.. thanks ppl


Reply


Messages In This Thread
If you script well, little help - by lilstuh - 01.07.2009, 03:15
Re: If you script well, little help - by Abernethy - 01.07.2009, 05:04
Re: If you script well, little help - by Grim_ - 01.07.2009, 05:18
Re: If you script well, little help - by Abernethy - 01.07.2009, 05:25
Re: If you script well, little help - by Grim_ - 01.07.2009, 05:27
Re: If you script well, little help - by ByFukara - 01.07.2009, 07:43
Re: If you script well, little help - by Andom - 01.07.2009, 08:14
Re: If you script well, little help - by Grim_ - 01.07.2009, 08:23
Re: If you script well, little help - by lilstuh - 01.07.2009, 18:42
Re: If you script well, little help - by Flo_White - 01.07.2009, 18:51

Forum Jump:


Users browsing this thread: 1 Guest(s)