21.06.2011, 11:50
What's the error?
It must look like here:
It must look like here:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
//Command Start Here
if (strcmp("/rcar", cmdtext, true, 10) == 0)
{
if(IsPlayerConnected(playerid))
{
new Name[MAX_PLAYER_NAME];
GetPlayerName(playerid,Name,sizeof(Name));
if(!strcmp(Name, "Tyler[DGZ]", true)) //Check the Player Name
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
SetVehiclePos(1, X, Y, Z); //1 = vehicleid. || X = Position X || Y = Position Y || Z = Position Z.
PutPlayerInVehicle(playerid, 1, 0); //1 = vehicleid || 0 = State(0 = Driver)
}
else
{
SendClientMessage(playerid,-1,"You can't use this command!");
return 1;
}
}
return 1;
}
//Command Finish Here
return 0;
}