09.05.2010, 15:21
Can anyone tell me how to make commands E.g /enter or /exit ( You may think i am a noob but... )
- Luis
- Luis
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/enter", cmdtext, true) == 0)
{
SetPlayerPos(playerid, x, y, z);
return 1;
}
if (strcmp("/exit", cmdtext, true) == 0)
{
SetPlayerPos(playerid, x, y, z);
return 1;
}
return 0;
}
C:\Users\BooNii3\San andreas SAMP Servers\The Godfather RP\gamemodes\gf.pwn(8187) : error 017: undefined symbol "x" C:\Users\BooNii3\San andreas SAMP Servers\The Godfather RP\gamemodes\gf.pwn(26262) : warning 235: public function lacks forward declaration (symbol "OnPlayerPrivmsg") Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
Originally Posted by Luis_Geramia
I seem to get this error?
Код:
C:\Users\BooNii3\San andreas SAMP Servers\The Godfather RP\gamemodes\gf.pwn(8187) : error 017: undefined symbol "x" C:\Users\BooNii3\San andreas SAMP Servers\The Godfather RP\gamemodes\gf.pwn(26262) : warning 235: public function lacks forward declaration (symbol "OnPlayerPrivmsg") Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error. |
public OnGameModeInIt() AddStaticPickup(1239, 1, x, y, z, -1);
public OnPlayerCommandText (playerid, cmdtext[]) { if (strcmp("/enter", cmdtext, true) == 0) { if(IsPlayerInRangeOfPoint(playerid, (How many feet away you can be from the entrance), x, y, z)) { SetPlayerPos(playerid, x, y, z); return 1; } else { SendClientMessage(playerid, COLOR_(Whatever Color), "You are not at the entrance to any building!"); } } return 0; }
SetPlayerInterior( playerid, ID);
Originally Posted by luigifan9
pawn Код:
|