16.02.2009, 13:11
Hi all, i have deathmatch zone in my server and i made that when player enter to it, he cannot use other teleports, so when i try to use teleport it works, but it says "SERVER: Unknown message" too and i dont want it to be showed. How can i repair that? Heres code:
Deathmatch teleport:
Teleport:
Deathmatch teleport:
pawn Код:
new DM[MAX_PLAYERS];
if(!strcmp(cmdtext,"/karas",true) || !strcmp(cmdtext, "/war",true))
{
DM[playerid] = 1;
ResetPlayerWeapons(playerid);
SetKarasRandomSpawn(playerid);
GivePlayerWeapon(playerid, 35, 200);
GivePlayerWeapon(playerid, 16, 200);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
SetSpawnInfo(playerid, GetPlayerTeam(playerid), GetPlayerSkin(playerid), KarasRandomSpawn[rand][0], KarasRandomSpawn[rand][1], KarasRandomSpawn[rand][2], KarasRandomSpawn[rand][3], 35, 200, 16, 200, 0, 0);
SetCameraBehindPlayer(playerid);
return 1;
}
pawn Код:
if(!strcmp(cmdtext,"/namai",true) || !strcmp(cmdtext, "/namo",true) || !strcmp(cmdtext, "/home",true))
if (DM[playerid] == 1)
{
SendClientMessage(playerid, COLOR_RED, "You cant use commands while in Deathmatch zone");
}
else if (DM[playerid] == 0)
{
if (IsPlayerInAnyVehicle(playerid)) {
SetVehiclePos(GetPlayerVehicleID(playerid),-1797.1227,913.9786,408.3081);
SetVehicleZAngle(GetPlayerVehicleID(playerid), 138.0194);
SetCameraBehindPlayer(playerid);
} else {
SetPlayerPos(playerid, -1752.5966, 893.0681, 299.4500);
SetPlayerFacingAngle(playerid, 270.6842);
SetCameraBehindPlayer(playerid);
}
return 1;
}