CMD doesn't work -
Sh4d0w2 - 08.11.2015
PHP код:
CMD:qdm(playerid, params[])
{
if(pInfo[playerid][CBDM] == 0) return SendClientMessage(playerid,COLOR_RED,"You're not in any deathmatch!");
if(pInfo[playerid][LEADER] == 1)
{
SpawnPlayer(playerid);
SetPlayerPos(playerid,2511.5886,-1665.9419,13.5726);
SetPlayerSkin(playerid,137);
SendClientMessage(playerid, COLOR_RED, "You Left Cbug Deathmatch!");
pInfo[playerid][CBDM] = 0;
}
if(pInfo[playerid][COLEADER] == 1)
{
SpawnPlayer(playerid);
SetPlayerPos(playerid,2317.3718,-1650.7227,14.2248);
SetPlayerSkin(playerid,230);
SendClientMessage(playerid, COLOR_RED, "You Left Cbug Deathmatch!");
pInfo[playerid][CBDM] = 0;
}
if(pInfo[playerid][ELDER] == 1)
{
SpawnPlayer(playerid);
SetPlayerPos(playerid,2511.5886,-1665.9419,13.5726);
SetPlayerSkin(playerid,134);
SendClientMessage(playerid, COLOR_RED, "You Left Cbug Deathmatch!");
pInfo[playerid][CBDM] = 0;
}
return 1;
}
This is my code.The problem is this
teleport me to a weird place.I got this coordinate from
and its work.But when use this cmd,its take me to a wrong place.
BTW the post should be 'SetPlayerPos doesn't work'.Sorry
Re : CMD doesn't work -
StreetRP - 08.11.2015
Show me : SpawnPlayer public
Re: CMD doesn't work -
Ritzy2K - 08.11.2015
Are you using SpawnPlayer as a stock?
Re: CMD doesn't work -
Sellize - 08.11.2015
You must have gotten the wrong coordinates. Go in game and type /save to save the coordinates.
Goto My documents > GTA San Andreas User Files > SAMP > savedpositions.txt
Re: CMD doesn't work -
Sh4d0w2 - 08.11.2015
Im not using spawn player as a stock.And the coordinate works on code below.
Here is the code :
PHP код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1212)//This is the ID of the Dialog
{
if(!response)
{
ShowPlayerDialog(playerid, 1212, DIALOG_STYLE_LIST, "Choose Your Rank", "{241ED6}Leader\n{DEE612}Co Leader\n{0FBD0F}Elder", "Choose", "Close");
}
if(response)
{
if(listitem == 0) //Leader
{
SpawnPlayer(playerid);
SetPlayerPos(playerid,1574.9681,-1635.9956,13.5509); // LSPD
SetPlayerSkin(playerid,137);
SendClientMessage(playerid, COLOR_BLUE, "Welcome [SoD] Leader");
GameTextForPlayer(playerid,"*Welcome To "#SERVERNAME"*",3000,3);
pInfo[playerid][LEADER] = 1;
}
if(listitem == 1)//Co Leader
{
SpawnPlayer(playerid);
SetPlayerPos(playerid,2317.3718,-1650.7227,14.2248); // Biker
SetPlayerSkin(playerid,230);
SendClientMessage(playerid, COLOR_YELLOW, "Welcome [SoD] Co Leader !");
GameTextForPlayer(playerid,"*Welcome To "#SERVERNAME"*",3000,3);
pInfo[playerid][COLEADER] = 1;
}
if(listitem == 2)//Elder
{
SpawnPlayer(playerid);
SetPlayerPos(playerid,2511.5886,-1665.9419,13.5726); // Groove Street
SetPlayerSkin(playerid,134);
SendClientMessage(playerid, COLOR_BLUE, "Welcome [SoD] Elder");
GameTextForPlayer(playerid,"*Welcome To "#SERVERNAME"*",3000,3);
pInfo[playerid][ELDER] = 1;
}
}
}
return 1;
}
Sorry but the coordinate get from above code not
Re : CMD doesn't work -
StreetRP - 08.11.2015
Show the fonction SpawnPlayer
Re: CMD doesn't work -
Sh4d0w2 - 08.11.2015
function SpawnPlayer?
Its just spawn a player right?
Click here
Re: CMD doesn't work -
Sh4d0w2 - 08.11.2015
Anyone?
Re: CMD doesn't work -
Ritzy2K - 08.11.2015
Are you sure the SetPlayerPos coords are right?
Re: CMD doesn't work -
Sh4d0w2 - 08.11.2015
Yes dude.I know its right.Its the same coord of the first spawn.