Deathmatch System ( Help With Teleports )
#4

In English

Quote:

if(GetPVarInt(playerid, "InDM")) return SendClientMessage(playerid, 0xAA3333AA, "[BlackDeathmatch]:Cannot Use this commande in deathmatch");
if (strcmp("/dm", cmdtext, true, 4) == 0)
{
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
if(InDM[playerid] == 0)
{
InDM[playerid] = 1;
SendClientMessage(playerid, COLOR_LIGHTBLUE , "You have Join the deathmatch (/dm) to leave");
format(String, sizeof(String), "[BlackDeathmatch]:{FFFFFF}%s(%d) Have Join the deathmatch (/dm)", PlayerName, playerid);
SendClientMessageToAll(COLOR_LIGHTBLUE, String);
SetPlayerInterior(playerid, 10);
SetPlayerVirtualWorld(playerid, 10);
new rand = random(sizeof(DMSpawns));
SetPlayerPos(playerid, DMSpawns[rand][0], DMSpawns[rand][1], DMSpawns[rand][2], DMSpawns[rand][3], DMSpawns[rand][4], DMSpawns[rand][5], DMSpawns[rand][6], DMSpawns[rand][7]);
SetPlayerFacingAngle(playerid, DMSpawns[rand][3]);
GivePlayerWeapon(playerid, 24, 999999);
GivePlayerWeapon(playerid, 26, 999999);
GivePlayerWeapon(playerid, 31, 999999);
GivePlayerWeapon(playerid, 16, 5);
SetPVarInt(playerid, "InDM", true);
}
else
{
InDM[playerid] = 0;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have leave the deathmatch");
SpawnPlayer(playerid);
SetPlayerHealth(playerid, 100);
ResetPlayerWeapons(playerid);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
SetPVarInt(playerid, "InDM", false);

Reply


Messages In This Thread
Deathmatch System ( Help With Teleports ) - by AlexBlack - 07.01.2014, 12:34
Re : Deathmatch System ( Help With Teleports ) - by AlexBlack - 07.01.2014, 13:02
Re : Deathmatch System ( Help With Teleports ) - by AlexBlack - 07.01.2014, 16:28
Re : Deathmatch System ( Help With Teleports ) - by AlexBlack - 07.01.2014, 20:47

Forum Jump:


Users browsing this thread: 1 Guest(s)