Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(strcmp(cmdtext, "/dm", true) == 0)
- {
- if(PlayerInfo[playerid][pDM] == 1 && PlayerInfo[playerid][pDM] == 2)
- {
- SendClientMessage(playerid,COLOR_RED,"Vous êtes déjà dans un DM");
- }
- ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Terrain de DeathMatch", "DeathMatch 1\nDeathMatch 2", "Aller", "Sortir");
- return 1;
- }
- if(strcmp(cmdtext, "/exit", true) == 0)
- {
- SendClientMessage(playerid,COLOR_RED,"rez");
- if(PlayerInfo[playerid][pDM] == 1 || PlayerInfo[playerid][pDM] == 2)
- {
- new randSpawn = 0;
- SetPlayerInterior(playerid,0);
- TogglePlayerClock(playerid,0);
- gPlayerHasCitySelected[playerid] = 0;
- SetPlayerVirtualWorld(playerid, 1);
- PlayerInfo[playerid][pDM] = 0;
- if(CITY_LOS_SANTOS == gPlayerCitySelection[playerid])
- {
- randSpawn = random(sizeof(gRandomSpawns_LosSantos));
- SetPlayerPos(playerid,
- gRandomSpawns_LosSantos[randSpawn][0],
- gRandomSpawns_LosSantos[randSpawn][1],
- gRandomSpawns_LosSantos[randSpawn][2]);
- SetPlayerFacingAngle(playerid,gRandomSpawns_LosSantos[randSpawn][3]);
- }
- else if(CITY_SAN_FIERRO == gPlayerCitySelection[playerid])
- {
- randSpawn = random(sizeof(gRandomSpawns_SanFierro));
- SetPlayerPos(playerid,
- gRandomSpawns_SanFierro[randSpawn][0],
- gRandomSpawns_SanFierro[randSpawn][1],
- gRandomSpawns_SanFierro[randSpawn][2]);
- SetPlayerFacingAngle(playerid,gRandomSpawns_SanFierro[randSpawn][3]);
- }
- else if(CITY_LAS_VENTURAS == gPlayerCitySelection[playerid])
- {
- randSpawn = random(sizeof(gRandomSpawns_LasVenturas));
- SetPlayerPos(playerid,
- gRandomSpawns_LasVenturas[randSpawn][0],
- gRandomSpawns_LasVenturas[randSpawn][1],
- gRandomSpawns_LasVenturas[randSpawn][2]);
- SetPlayerFacingAngle(playerid,gRandomSpawns_LasVenturas[randSpawn][3]);
- }
- return 1;
- }
- else
- {
- SendClientMessage(playerid,COLOR_RED,"Vous n'êtes pas dans un deathmatch !");
- return 1;
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement