public OnPlayerSpawn(playerid)
{
if(PlayerInfo[playerid][pVip] == 1) SetPlayerArmour(playerid, 90);
if(PlayerInfo[playerid][pVip] == 1) Attach3DTextLabelToPlayer(vlabel, playerid, 0.0, 0.0, 0.7);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
IsRobbing[playerid] =0;
zoneupdates[playerid] = 1;
player_zone[playerid] = -1;
if(!zoneupdate) zoneupdate = SetTimer("update_zones",1000,4);
SetPlayerToTeamColour(playerid);
if(gTeam[playerid] == TEAM_COP)
{
TextDrawShowForPlayer(playerid, CopClassTxd);
SendClientMessage(playerid, COLOR_BLUE, "You are a cop now.See /help for more info and /cmds.");
SendClientMessage(playerid, COLOR_BLUE, "Your job is to arrest criminals.Do NOT kill other COPS or CIVILIANS,you are the LAW,respect it and give the good example.");
GiveCopWeps(playerid);
}
if(gTeam[playerid] == TEAM_CIV)
{
TextDrawShowForPlayer(playerid, CivClassTxd);
SendClientMessage(playerid, COLOR_WHITE, "You are a civilian now.Your job is to rob players,stores and much more.Check /help for more info and /cmds.");
SendClientMessage(playerid, COLOR_WHITE, "Please remember: This is NOT a deathmatch server,don't kill people randomly or you will be arrested or in extreme cases,killed.");
GiveCivWeps(playerid);
}
return 1;
}
---------------------------------- [12:45:15] SFGW Cops&Robbers Initialized. [12:45:15] ---------------------------------- [12:45:15] Number of vehicle models: 173 [12:46:41] Incoming connection: ***** [12:46:42] [join] Test has joined the server (0:*********) ---------- Loaded log file: "server_log.txt". ---------- SA-MP Dedicated Server ---------------------- v0.3e-RC7, ©2005-2012 SA-MP Team [12:47:40] filterscripts = "" (string) [12:47:40] [12:47:40] Server Plugins [12:47:40] -------------- [12:47:40] Loading plugin: sscanf.so [12:47:40] [12:47:40] =============================== [12:47:40] sscanf plugin loaded. [12:47:40] © 2009 Alex "******" Cole [12:47:40] 0.3d-R2 500 Players "dnee" [12:47:40] =============================== [12:47:40] Loaded. [12:47:40] Loading plugin: streamer.so [12:47:40] *** Streamer Plugin v2.6.1 by Incognito loaded *** [12:47:40] Loaded. [12:47:40] Loading plugin: irc.so [12:47:40] *** IRC Plugin v1.4.2 by Incognito loaded *** [12:47:40] Loaded. [12:47:40] Loaded 3 plugins. [12:47:40] [12:47:40] Filterscripts [12:47:40] --------------- [12:47:40] Loaded 0 filterscripts. [12:47:40] OnGameo [12:47:40] [12:47:40] ======================================= [12:47:40] | | [12:47:40] | YSI version 1.03.0011 | [12:47:40] | By Alex "******" Cole | [12:47:40] | | [12:47:40] | Checking the latest YSI version.. | [12:47:40] | | [12:47:40] ======================================= [12:47:40] [12:47:40] Loaded 3 vehicles from: vehicles/trains.txt [12:47:40] Loaded 3 vehicles from: vehicles/pilots.txt [12:47:40] Loaded 15 vehicles from: vehicles/lv_law.txt [12:47:40] Loaded 39 vehicles from: vehicles/lv_airport.txt [12:47:40] Loaded 255 vehicles from: vehicles/lv_gen.txt [12:47:40] Loaded 38 vehicles from: vehicles/sf_law.txt [12:47:40] Loaded 35 vehicles from: vehicles/sf_airport.txt [12:47:41] Loaded 353 vehicles from: vehicles/sf_gen.txt [12:47:41] Loaded 24 vehicles from: vehicles/ls_law.txt [12:47:41] Loaded 37 vehicles from: vehicles/ls_airport.txt [12:47:41] Loaded 98 vehicles from: vehicles/ls_gen_inner.txt [12:47:41] Loaded 389 vehicles from: vehicles/ls_gen_outer.txt [12:47:41] Loaded 71 vehicles from: vehicles/whetstone.txt [12:47:41] Loaded 168 vehicles from: vehicles/bone.txt [12:47:41] Loaded 61 vehicles from: vehicles/flint.txt [12:47:41] Loaded 96 vehicles from: vehicles/tierra.txt [12:47:41] Loaded 96 vehicles from: vehicles/red_county.txt [12:47:41] ---------------------------------- [12:47:41] SFGW Cops&Robbers Initialized. [12:47:41] ---------------------------------- [12:47:41] Number of vehicle models: 173 |
if(!zoneupdate) zoneupdate = SetTimer("update_zones",1000,4);
forward update_zones();
public update_zones() {
new line1[10];
new line2[10];
for(new i=0; i<MAX_PLAYERS; i++) {
if(IsPlayerConnected(i) && zoneupdates[i] == 1) {
if(IsPlayerInZone(i,player_zone[i])) { }
else {
new player_zone_before;
player_zone_before = player_zone[i];
player_zone[i] = -1;
for(new j=0; j<sizeof(zones);j++) {
if(IsPlayerInZone(i,j) && player_zone[i] == -1) {
if(player_zone_before == -1) GameTextForPlayer(i,zones[j][zone_name],1500,1);
else if(strcmp(zones[j][zone_name],zones[player_zone_before][zone_name],true) != 0) GameTextForPlayer(i,zones[j][zone_name],1500,1);
player_zone[i] = j;
format(line1,10,"p%dzone",i);
format(line2,10,"%d",j);
}
}
if(player_zone[i] == -1) player_zone[i] = player_zone_before;
}
}
}
}