C:\Documents and Settings\Joe\Desktop\Server\filterscripts\TimerTest.pwn(49) : error 030: compound statement not closed at the end of file (started at line 40)
if(!strcmp(cmdtext, "/exit", true))
{
if(PlayerToPoint(1.0,playerid,2454.8635,-4314.5889,11.2693))
{
SetPlayerPos(playerid, -1618.4510,681.7073,7.1875);
return 1;
}
if(!strcmp(cmdtext, "/exit", true))
{
if(PlayerToPoint(1.0,playerid,2454.8635,-4314.5889,11.2693))
{
SetPlayerPos(playerid, -1618.4510,681.7073,7.1875);
}
return 1;
}
#include <a_samp>
#define MAPMENU 1
forward PlayerToPoint(playerid, Float:x, Float:y, Float:z);
forward PlayerToPointStripped(playerid, Float:x, Float:y, Float:z, Float:curx, Float:cury, Float:curz);
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(cmdtext, "/test", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerToPoint(playerid,255.3,77.4,1003.6))
{
ShowPlayerDialog(playerid, MAPMENU, DIALOG_STYLE_LIST, "Los Santos Police Departament","Nite Stick\nSpraycan", "Take", "Cancel");
}
return 1;
}
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == MAPMENU)
{
if(response)
{
if(listitem == 0) // Nite Stick
{
GivePlayerWeapon(playerid, 3, 0);
}
if(listitem == 1) // Spraycan
{
GivePlayerWeapon(playerid, 41, 999999);
}
}
}
return 1;
}
|
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp(cmdtext, "/test", true) == 0) { if(IsPlayerConnected(playerid)) { if (PlayerToPoint(playerid,255.3,77.4,1003.6)) { ShowPlayerDialog(playerid, MAPMENU, DIALOG_STYLE_LIST, "Los Santos Police Departament","Nite Stick\nSpraycan", "Take", "Cancel"); } return 1; } } } return 0; } |
#include <a_samp>
#define MAPMENU 1
#define PlayerToPoint(%1, %2, %3, %4, %5) IsPlayerInRangeOfPoint(%2, %1, %3, %4, %5)
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(cmdtext, "/test", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, 2695.6880, -1704.6300, 11.8438))
{
ShowPlayerDialog(playerid, MAPMENU, DIALOG_STYLE_LIST, "Los Santos Police Departament","Nite Stick\nSpraycan", "Take", "Cancel");
}
return 1;
}
}
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == MAPMENU)
{
if(response)
{
if(listitem == 0) // Nite Stick
{
GivePlayerWeapon(playerid, 3, 0);
}
if(listitem == 1) // Spraycan
{
GivePlayerWeapon(playerid, 41, 999999);
}
}
}
return 1;
}
C:\Users\Desktop\San Andreas Server\filterscripts\test.pwn(28) : warning 209: function "OnPlayerCommandText" should return a value C:\Users\Desktop\San Andreas Server\filterscripts\test.pwn(29) : error 010: invalid function or declaration Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error./code]