Help with a teleport command
#1

what's worng here ?

if(strcmp (cmdtext, "/ship", true)==0)
{
if(!IsPlayerInAnyVehicle(playerid)) return SetPlayerPos(playerid,-2402.7239,1402.8665,7.3363);
SetVehiclePos(GetPlayerVehicleID(playerid),-2402.7239,1402.8665,7.3363);
GivePlayerWeapon(playerid, 31, 350);
GivePlayerWeapon(playerid, 25, 50);
GivePlayerWeapon(playerid, 29, 300);
SendClientMessage(playerid, COLOR_BLUE, "The area Made By BurnOut");
return 1;
}
Reply
#2

pawn Код:
new vehicle;
vehicle = GetPlayerVehicleID(playerid);
SetVehiclePos(vehicle,-2402.7239,1402.8665,7.3363);
Reply
#3

can you write the command from the beginnging ?
the "giveplayerweapon" and sendclientmessage doesn't work...
can you rewrtite the commnad ?
Reply
#4

Edit: NVM omg it didnt work :/
working on a new one sry

Edit 2:
pawn Код:
if(strcmp (cmdtext, "/ship", true)==0)
{
    new car;
    car = GetPlayerVehicleID(playerid);
    if(!IsPlayerInAnyVehicle(playerid))
    {
    SetVehiclePos(car,-2402.7239,1402.8665,7.3363);
    GivePlayerWeapon(playerid, 31, 350);
    GivePlayerWeapon(playerid, 25, 50);
    GivePlayerWeapon(playerid, 29, 300);
    SendClientMessage(playerid, COLOR_BLUE, "The area Made By BurnOut");
    }
    else
    {
    SetPlayerPos(playerid,-2402.7239,1402.8665,7.3363);
    GivePlayerWeapon(playerid, 31, 350);
    GivePlayerWeapon(playerid, 25, 50);
    GivePlayerWeapon(playerid, 29, 300);
    SendClientMessage(playerid, COLOR_BLUE, "The area Made By BurnOut");
    }
  return 1;
}
hope it works now
Reply
#5

Simply
Код:
if(!strcmp(cmdtext, "/ship", true))
{
	new car;
	car = GetPlayerVehicleID(playerid);
	if(!GetPlayerVehicleSeat(playerid)) SetVehiclePos(car,-2402.7239,1402.8665,7.3363);
	else SetPlayerPos(playerid,-2402.7239,1402.8665,7.3363);
 	GivePlayerWeapon(playerid, 31, 350);
 	GivePlayerWeapon(playerid, 25, 50);
 	GivePlayerWeapon(playerid, 29, 300);
 	SendClientMessage(playerid, COLOR_BLUE, "The area Made By BurnOut");
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)