leave cmd req -
Spartaaaaa - 06.08.2014
Hello,
i want dm command" when i write /LEAVE i must spawn here. see the code below"
Код:
AddPlayerClass(217,404.8082,2448.4775,16.5703,0.0000,0,0,0,0,0,0); // /aa
AddPlayerClass(217,1856.7678,-2281.7593,16.0903,90.0000,0,0,0,0,0,0); // /lsair
AddPlayerClass(217,1591.0516,1447.7815,13.3303,90.0000,0,0,0,0,0,0); // /lsvair
AddPlayerClass(217,-1374.3136,-257.4903,18.7700,270.0000,0,0,0,0,0,0); //
Re: leave cmd req -
dirigent00 - 06.08.2014
Random of this coords or?
Re: leave cmd req -
Spartaaaaa - 06.08.2014
You mean when someone write /leave he must spawn at this place SEE CODES
Re: leave cmd req -
dirigent00 - 06.08.2014
Try:
Код:
new Float:RandomSpawns[][] =
{
{404.8082,2448.4775,16.5703,0.0000}, // /aa
{1856.7678,-2281.7593,16.0903,90.0000}, // /lsair
{1591.0516,1447.7815,13.3303,90.0000}, // /lsvair
{-1374.3136,-257.4903,18.7700,270.0000} //
};
OnPlayerSpawn(playerid)
{
new Random = random(sizeof(RandomSpawns));
SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
SetPlayerFacingAngle(playerid, RandomSpawns[Random][3]);
return 1;
}
Re: leave cmd req -
HeLiOn_PrImE - 06.08.2014
The text above + this:
Код:
if (strcmp(cmdtext, /leave", true) == 0)
{
//check if he is in that specific dm arena
SpawnPlayer(playerid);
return 1;
}
You must have something like this around there somewhere.
Re: leave cmd req -
Spartaaaaa - 06.08.2014
but i don't have /leave command on my gm :c any help
Код:
public OnPlayerCommandReceived(playerid, cmdtext[])
{
//--------------------------------------------------------------------------
if(GetPVarInt(playerid, "PlayerInDM") == 1 || GetPVarInt(playerid, "PlayerInRace") == 1 || GetPVarInt(playerid, "PlayerInGifts") == 1)
{
//----------------------------------------------------------------------
if(strcmp(cmdtext, "/leave", true ) == 0) return 0;
if(strcmp(cmdtext, "/ad", true ) == 0) return 0;
if(strcmp(cmdtext, "/myskin", true ) == 0) return 0;
if(strcmp(cmdtext, "/cmds", true ) == 0) return 0;
if(strcmp(cmdtext, "/skin", true ) == 0) return 0;
//----------------------------------------------------------------------
else GameTextForPlayer(playerid, "~w~Use ~r~/Leave~w~ to leave!", 6000, 4);
return 1;
}
//--------------------------------------------------------------------------
if(GetPVarInt(playerid, "Jailed") == 1)
{
SendClientMessage(playerid, red, "ERROR: You cannot use commands in Jail!");
return 1;
}
//--------------------------------------------------------------------------
else return 0;
}
Re: leave cmd req -
Spartaaaaa - 06.08.2014
bump
Re: leave cmd req -
JessThompson - 06.08.2014
Add me on skype lenny9113
I have a idea for you
Re: leave cmd req -
HeLiOn_PrImE - 07.08.2014
I can't advise anything if you don't know your own gm. I hope lenny9113 can help you more.
And wait 24 hours to bump your topic. Early 3 hour bumps won't make the forum staff happy.