if(strcmp(cmdtext, "/islanddm", true)==0) { SetPlayerInterior(playerid, 0); new rand = random(sizeof(gRandomPlayerSpawns)); SetPlayerPos(playerid, islanddmspawns[rand][0], islanddmspawns[rand][1], islanddmspawns[rand][2]); SetPlayerFacingAngle(playerid, 0.0); GivePlayerWeapon(playerid,46,1); SendClientMessage(playerid, COLOR_BLUE, "DEATHMATCH ISLAND"); DMZone[playerid] = 1; return 1; |
public OnPlayerSpawn(playerid){
if(DMZone[playerid] = 1){
OnPlayerCommandText(playerid,"/islanddm");
return true;
}
return true;
}
if(DMZone[playerid] >= 1) { new rand = random(sizeof(islanddmspawns)); SetPlayerPos(playerid, islanddmspawns[rand][0], islanddmspawns[rand][1], islanddmspawns[rand][2]); return 1; } if(DMZone[playerid] >= 2) { new rand = random(sizeof(planningdeptdm)); SetPlayerPos(playerid, planningdeptdm[rand][0], planningdeptdm[rand][1], planningdeptdm[rand][2]); return 1; } if(DMZone[playerid] >= 3) { new rand = random(sizeof(flamethrowerdm)); SetPlayerPos(playerid, flamethrowerdm[rand][0], flamethrowerdm[rand][1], flamethrowerdm[rand][2]); return 1; } |
switch(DMZone[playerid]){
case 0:{
SendClientMessage(playerid,color,"no dm");
}
case 1:{
//bla....
}
case 2:{
//bla....
}
case 3:{
//bla....
}
}
return true;