Command help - 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)
+--- Thread: Command help (
/showthread.php?tid=297877)
Command help -
Jordiee - 18.11.2011
Код:
CMD:skiptut(playerid, params[]) {
{
SetPlayerPos(playerid, -201.4800, 1121.3499, 19.7422, 274.1669);
SendClientMessage(playerid, COLOR_YELLOW, "You have skipped the tut, dont abuse this to get away from a RP.");
}
return 1;
}
i keep getting a error on this and how would I make this only work if they are in a tutorial.
Re: Command help -
Jordiee - 18.11.2011
Код:
C:\Users\Jordan\Desktop\Windows\gamemodes\vx-rp.pwn(10835) : warning 202: number of arguments does not match definition
C:\Users\Jordan\Desktop\Windows\gamemodes\vx-rp.pwn(10838) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Warnings.
Re: Command help -
Sinner - 18.11.2011
SetPlayerPos(); expects only 4 parameters, playerid, X, Y and Z, not the rotation. Also you didn't indent properly
pawn Код:
CMD:skiptut(playerid, params[])
{
SetPlayerPos(playerid, -201.4800, 1121.3499, 19.7422);
SetPlayerFacingAngle(playerid, 274.1669);
SendClientMessage(playerid, COLOR_YELLOW, "You have skipped the tut, dont abuse this to get away from a RP.");
return 1;
}
Re: Command help -
Jordiee - 18.11.2011
how would i make it so it would only work if they are in a tutorial
Re: Command help -
moadi - 18.11.2011
pawn Код:
new pInTut[MAX_PLAYERS]; // global variable
CMD:skiptut(playerid, params[])
{
if(pInTut[playerid] == 1)
{
SetPlayerPos(playerid, -201.4800, 1121.3499, 19.7422);
SetPlayerFacingAngle(playerid, 274.1669);
SendClientMessage(playerid, COLOR_YELLOW, "You have skipped the tut, dont abuse this to get away from a RP.");
}
else
{
SendClientMessage(playerid,ANY_COLOR,"You are not in a tutorial that you can skip!");
}
return 1;
}
In your script, where the player gets forced into a tutorial, add something like:
Also, don't forget to adjust this
Код:
SendClientMessage(playerid,ANY_COLOR,"You are not in a tutorial that you can skip!");
Re: Command help -
Jordiee - 18.11.2011
Thanks it compiled good but I can't check it yet cos Volt-host isnt reading my Database :/