SA-MP Forums Archive
How to make parachute? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to make parachute? (/showthread.php?tid=243133)



How to make parachute? - IvancheBG - 21.03.2011

Can someone tell me how to make parachute command.Like when i type /para it cames a parachute pelase tell!


Re: How to make parachute? - TheYoungCapone - 21.03.2011

Код:
if(strcmp(cmdtext, "/para", true) == 0)
{
	GivePlayerWeapon(playerid,46,1);
	SendClientMessage(playerid, 0x00FF00FF, "You've Received a Parachute!");
	return 1;
}



Re: How to make parachute? - IvancheBG - 21.03.2011

how to made more than 1 command because I made a telepor command


Re: How to make parachute? - Stigg - 21.03.2011

pawn Код:
if(strcmp(cmdtext, "/para", true) == 0)
{
    GivePlayerWeapon(playerid,46,1);
    SendClientMessage(playerid, 0x00FF00FF, "You've Received a Parachute!");
    return 1;
}
if(strcmp(cmdtext, "/tele", true) == 0)
{
//blah blah
ect....



Re: How to make parachute? - IvancheBG - 21.03.2011

It sned me this errors when i compile C:\Documents and Settings\user\Desktop\server samp\gamemodes\test.pwn(114 -- 115) : error 001: expected token: ")", but found ";"
C:\Documents and Settings\user\Desktop\server samp\gamemodes\test.pwn(116) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.


Re: How to make parachute? - Stigg - 21.03.2011

Show us the command you made.


Re: How to make parachute? - IvancheBG - 21.03.2011

if(strcmp(cmdtext, "/para", true) == 0)
(
GivePlayerWeapon(playerid,46,1);
SendClientMessage(playerid, 0x00FF00FF, "You've Received a Parachute!");
return 1;


Re: How to make parachute? - Stigg - 21.03.2011

Quote:
Originally Posted by IvancheBG
Посмотреть сообщение
if(strcmp(cmdtext, "/para", true) == 0)
(
GivePlayerWeapon(playerid,46,1);
SendClientMessage(playerid, 0x00FF00FF, "You've Received a Parachute!");
return 1;
pawn Код:
if(strcmp(cmdtext, "/para", true) == 0)//your para command
{
    GivePlayerWeapon(playerid,46,1);
    SendClientMessage(playerid, 0x00FF00FF, "You've Received a Parachute!");
    return 1;
}
if(strcmp(cmdtext, "/tele", true) == 0)//your tele command
{
    //do some new stuff here
    return 1;
}
Then just repeat this for any other commands you want.


Re: How to make parachute? - IvancheBG - 21.03.2011

still isnt working this is my whole commands

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/vinewood", cmdtext, true, 10) == 0)
	{
	    SetPlayerPos(playerid, 1387.4211, -819.5637, 73.9426);
	    SetPlayerFacingAngle(playerid, 0);
	    SendClientMessage(playerid, 0x00FFFFAA, "Your have been teleported to Vinewood.");
	    return 1;
	}
	if(strcmp(cmdtext, "/para", true) == 0)
	(
           GivePlayerWeapon(playerid,46,1);
           SendClientMessage(playerid, 0x00FF00FF, "You've Received a Parachute.");
           return 1;



Re: How to make parachute? - Stigg - 21.03.2011

Quote:
Originally Posted by IvancheBG
Посмотреть сообщение
still isnt working this is my whole commands

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/vinewood", cmdtext, true, 10) == 0)
	{
	    SetPlayerPos(playerid, 1387.4211, -819.5637, 73.9426);
	    SetPlayerFacingAngle(playerid, 0);
	    SendClientMessage(playerid, 0x00FFFFAA, "Your have been teleported to Vinewood.");
	    return 1;
	}
	if(strcmp(cmdtext, "/para", true) == 0)
	(
           GivePlayerWeapon(playerid,46,1);
           SendClientMessage(playerid, 0x00FF00FF, "You've Received a Parachute.");
           return 1;
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/vinewood", cmdtext, true) == 0)
    {
        SetPlayerPos(playerid, 1387.4211, -819.5637, 73.9426);
        SetPlayerFacingAngle(playerid, 0);
        SendClientMessage(playerid, 0x00FFFFAA, "Your have been teleported to Vinewood.");
        return 1;
    }
    if(strcmp(cmdtext, "/para", true) == 0)
    {
        GivePlayerWeapon(playerid,46,1);
        SendClientMessage(playerid, 0x00FF00FF, "You've Received a Parachute.");
        return 1;
    }
    return 0;
}