28.07.2012, 18:55
I got a problem when Spawning in a virtual world. Why do I need to get killed or die first in that place before I can see the objects?
pawn Код:
CMD:cs(playerid, params[])
{
if(gCommandsDisabled[playerid]==true)
{
ShowPlayerDialog(playerid, DIALOG_EVADE, DIALOG_STYLE_MSGBOX, "Leave Menu", "You must Leave first before using this command", "Leave", "Cancel");
return 1;
}
new string[128], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
format(string, sizeof(string), "{6666FF}(/cs) {00CCFF}%s {6666FF}has Teleported to Counter-Strike",pName);
SendClientMessageToAll(playerid, string);
SetPlayerVirtualWorld(playerid, 2);
DestroyVehicle(GetPlayerVehicleID(playerid));
new Random = random(sizeof(RandomSpawnCsDM));
SetPlayerPos(playerid, RandomSpawnCsDM[Random][0], RandomSpawnCsDM[Random][1], RandomSpawnCsDM[Random][2]);
SetPlayerFacingAngle(playerid, RandomSpawnCsDM[Random][3]);
GameTextForPlayer(playerid,"~y~Welcome to ~n~~b~Counter-Strike",2000,3);
gCommandsDisabled[playerid]=true;
return 1;
}