03.04.2010, 23:09
alrighty, this sorta works.. but now there's warnings, and none of my commands work.
Added code
Warnings
Added code
pawn Код:
dcmd_ptele1(playerid,params[])
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/help", true) == 0)
{
SendClientMessage(playerid, COLOR_BLUE, "++++++++++++++++++++++HELP MENU++++++++++++++++++++++");
SendClientMessage(playerid, COLOR_RED, "Player Commands /pcmds");
SendClientMessage(playerid, COLOR_RED, "General Commands /gcmds");
SendClientMessage(playerid, COLOR_RED, "Objective /jobs");
SendClientMessage(playerid, COLOR_RED, "Vehicles & Weapons /vw");
SendClientMessage(playerid, COLOR_RED, "Administrator Commands /acmds");
return 1;
}
if(strcmp(cmdtext, "/suicide", true) == 0)
{ SetPlayerHealth(playerid, 0);
SendClientMessage(playerid, COLOR_RED, "You have commited suicide.");
return 1;
}
if(strcmp(cmdtext, "/pcmds", true) == 0)
{ SendClientMessage(playerid, COLOR_BLUE, "++++++++++++++++++++++Player Commands++++++++++++++++++++++");
SendClientMessage(playerid, COLOR_RED, "/suicide - Kill yourself.");
return 1;
}
if(strcmp(cmdtext, "/gcmds", true) == 0)
{ SendClientMessage(playerid, COLOR_BLUE, "++++++++++++++++++++++General Commands++++++++++++++++++++++");
SendClientMessage(playerid, COLOR_RED, "/stats - shows you your current stats.");
return 1;
}
if(strcmp(cmdtext, "/stats", true) == 0)
{ SendClientMessage(playerid, COLOR_BLUE, "++++++++++++++++++++++Stats++++++++++++++++++++++");
SendClientMessage(playerid, COLOR_RED, "-Name-");
new name[MAX_PLAYER_NAME], string[48];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s ", name );
SendClientMessage(playerid, COLOR_WHITE, string);
SendClientMessage(playerid, COLOR_RED, "-Money-");
format(string, sizeof(string), "You Have $%i.", GetPlayerMoney(playerid));
SendClientMessage(playerid, COLOR_WHITE, string);
return 1;
{
dcmd(ptele1,6,cmdtext);
return 0;
}
new pid;
if(IsPlayerAdmin(playerid));
else if(params,"u",pid)) return SendClientMessage(playerid,COLOUR_RED,"Usage: /ptele1 [ID]");
else if(pid == INVALID_PLAYER_ID) return SendClientMessage(playerid,COLOUR_RED,"Inactive player id");
else
{
new name[MAX_PLAYER_NAME],string[128];
GetPlayerName(pid,name,sizeof(name));
format(string,sizeof(string),"%s has been sent to Jail 1!",name);
SendClientMessageToAll(COLOUR_RED,string);
SetPlayerPos(playerid,2652.8525,2732.3157,10.8203);
return 1;
}
}
if(strcmp(cmdtext, "/vw", true) == 0)
{
if(IsPlayerAdmin(playerid)) SendClientMessage(playerid, COLOR_WHITE, "Vehicle Spawned!");
else SendClientMessage(playerid, COLOR_RED, "You must be logged into RCON to use this command.");
return 1;
}
return 0;
}
pawn Код:
C:\Documents and Settings\Skellyhand\Desktop\gtaserver\gamemodes\Untitled.pwn(383) : warning 203: symbol is never used: "OnPlayerCommandText"
C:\Documents and Settings\Skellyhand\Desktop\gtaserver\gamemodes\Untitled.pwn(383) : warning 203: symbol is never used: "dcmd_ptele1"
C:\Documents and Settings\Skellyhand\Desktop\gtaserver\gamemodes\Untitled.pwn(383) : warning 203: symbol is never used: "ret_memcpy"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
3 Warnings.