07.06.2012, 10:00
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
if (strcmp("/v bansh", cmdtext, true, 10) == 0)
{
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "ERROR: You already have a Vehicle");
if(Veh[playerid] != 0) DestroyVehicle(Veh[playerid]);continue the rest of the command
new Float:x, Float:y, Float:z, Float:angle;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, angle);
Veh[playerid] = CreateVehicle(429, x, y, z, angle, 0, 0, 60);
PutPlayerInVehicle(playerid, Veh[playerid], 0);
ChangeVehicleColor(Veh[playerid], 2, 1);
return 1;
}
Quote:
.pwn(243) : warning 209: function "OnPlayerCommandText" should return a value |
and how can i add more Commands under it ?
Sory But iam New in Scripiting