10.11.2010, 13:48
that is very nice what you made but..
Thats how i have it with co-ords and so on:
but when npc joins he gets kicked same second not even reaching the point :/
and i got 3 warnings too:
D:\Server\server\gamemodes\1337.pwn(13346) : warning 206: redundant test: constant expression is non-zero
D:\Server\server\gamemodes\1337.pwn(13350) : warning 219: local variable "drifter1" shadows a variable at a preceding level
D:\Server\server\gamemodes\1337.pwn(134) : warning 204: symbol is assigned a value that is never used: "npcdrifttimer"
Thats how i have it with co-ords and so on:
Quote:
public KickNPCOnPoint() { for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(PlayerToPoint(5.0,i,-429.1989,1412.5939,31)) // Change with your coordonates where you want the NPC to be kicked { if(IsPlayerNPC(i)) { new drifter1[MAX_PLAYER_NAME]; GetPlayerName(i, drifter1, sizeof(drifter1)); //Getting the NPC's name. if(!strcmp(drifter1, "drifter1", true)) //Checking if the NPC's name is .... { Kick(i); } } } } } return 1; } |
and i got 3 warnings too:
D:\Server\server\gamemodes\1337.pwn(13346) : warning 206: redundant test: constant expression is non-zero
D:\Server\server\gamemodes\1337.pwn(13350) : warning 219: local variable "drifter1" shadows a variable at a preceding level
D:\Server\server\gamemodes\1337.pwn(134) : warning 204: symbol is assigned a value that is never used: "npcdrifttimer"