27.02.2013, 00:49
Im trying to make a command so that only one player can use it but I'm getting errors.
It's the datguy command I included the b command just in case that could be causing it.
Here are the errors.
PHP код:
CMD:b(playerid, params[])
{
new string[128],pName[MAX_PLAYER_NAME];
if(sscanf(params, "s[128]", params)) return SendClientMessage(playerid,WHITE, "USAGE: /b [text] (Local OOC Chat)");
GetPlayerName(playerid, pName, sizeof(pName)); //This gets the player name...
format(string, sizeof(string), "%s: (( %s ))", pName, params); //This format gets what the player types
ProxDetector(30,playerid, string,GREY);
return 1;
}
CMD:datguy(playerid, params[])
{
//----------------[Variables for owners name]----------------------------
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
if(IsPlayerInAnyVehicle(playerid))
return SendClientMessage(playerid, RED, "ERROR: You already have a Vehicle");
}
if(strcmp(sendername, "Tyler_Hale", false) == 0)
{
SendClientMessage(playerid,RED,"You can not perform this command you are not Tyler Hale")
}
if(!strlen(params))
{
SendClientMessage(playerid,-1, "Usage: /datguy")
return SendClientMessage(playerid,ORANGE,"Function: Will create datguy car made for Tyler")
}
new Float:X,Float:Y,Float:Z,Float:Angle;
GetPlayerPos(playerid,X,Y,Z);
GetPlayerFacingAngle(playerid,Angle);
SetVehicleNumberPlate(CreateVehicle(545,X,Y,Z,Angle,158,158,-1)"DATGUY");
return 1;
}
Here are the errors.
PHP код:
C:\Users\logan_000\Desktop\Samp server\pawno\include\OPSP.inc(63) : warning 219: local variable "Angle" shadows a variable at a preceding level
C:\Users\logan_000\Desktop\Samp server\gamemodes\lramos15.pwn(499) : warning 209: function "cmd_datguy" should return a value
C:\Users\logan_000\Desktop\Samp server\gamemodes\lramos15.pwn(500) : error 010: invalid function or declaration
C:\Users\logan_000\Desktop\Samp server\gamemodes\lramos15.pwn(504) : error 010: invalid function or declaration
C:\Users\logan_000\Desktop\Samp server\gamemodes\lramos15.pwn(507) : error 010: invalid function or declaration
C:\Users\logan_000\Desktop\Samp server\gamemodes\lramos15.pwn(510) : error 021: symbol already defined: "GetPlayerPos"
C:\Users\logan_000\Desktop\Samp server\gamemodes\lramos15.pwn(513) : error 010: invalid function or declaration
C:\Users\logan_000\Desktop\Samp server\gamemodes\lramos15.pwn(713) : warning 203: symbol is never used: "Angle"
C:\Users\logan_000\Desktop\Samp server\gamemodes\lramos15.pwn(713) : warning 203: symbol is never used: "X"
C:\Users\logan_000\Desktop\Samp server\gamemodes\lramos15.pwn(713) : warning 203: symbol is never used: "Y"
C:\Users\logan_000\Desktop\Samp server\gamemodes\lramos15.pwn(713) : warning 203: symbol is never used: "Z"
C:\Users\logan_000\Desktop\Samp server\gamemodes\lramos15.pwn(713) : warning 203: symbol is never used: "gTeam"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
5 Errors.