15.07.2014, 20:55
Esta dando estes erros :
linhas do erro : tmp = strtok(cmdtext, idx);
comando :
alguem aew me ajuda a converter ??
pawn Код:
error 017: undefined symbol "strtok"
error 033: array must be indexed (variable "tmp")
comando :
pawn Код:
CMD:v(playerid, params[])
{
new String[200];
new tmp[256];
new Float:x, Float:y, Float:z;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid,Vermelho, "You diden't give a vehicle name");
new vehicle = GetVehicleModelIDFromName(tmp);
if(vehicle < 400 || vehicle > 611) return SendClientMessage(playerid, Vermelho, "That vehicle name was not found");
new Float:a;
GetPlayerFacingAngle(playerid, a);
GetPlayerPos(playerid, x, y, z);
if(IsPlayerInAnyVehicle(playerid) == 1)
{
GetXYInFrontOfPlayer(playerid, x, y, 8);
}
else
{
GetXYInFrontOfPlayer(playerid, x, y, 5);
}
new PlayersVehicle = CreateVehicle(vehicle, x, y, z, a+90, -1, -1, -1);
LinkVehicleToInterior(PlayersVehicle, GetPlayerInterior(playerid));
format(String, sizeof(String), "You have spawned a %s", aVehicleNames[vehicle - 400]);
SendClientMessage(playerid, Verde, String);
return 1;
}