Command help
#1

Код:
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.
Reply
#2

Код:
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.
Reply
#3

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;
}
Reply
#4

how would i make it so it would only work if they are in a tutorial
Reply
#5

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:
pawn Код:
pInTut[playerid] = 1;

Also, don't forget to adjust this
Код:
          SendClientMessage(playerid,ANY_COLOR,"You are not in a tutorial that you can skip!");
Reply
#6

Thanks it compiled good but I can't check it yet cos Volt-host isnt reading my Database :/
Reply


Forum Jump:


Users browsing this thread: