13.02.2012, 11:13
i tried to create a car spawner. ended up in this.but it doesnt seem to work.
please correct me.
i think something is wrong in the ssancf line? hmm
p.s. ID is a global var
and this IP doesnt work properly
please correct me.
pawn Код:
CMD:v(playerid, params[])
{
new /*col1, col2,*/ vehid;
new Float:x,Float:y,Float:z,Float:a;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, a);
if(sscanf(params, "u",vehid)) return SendClientMessage(playerid, -1, "Usage: /v [modelid]");
ID = GetPlayerVehicleID(playerid);
ID = CreateVehicle(vehid, x + 2, y, z, a + 90, -1, -1, 10);
PutPlayerInVehicle(playerid, ID, 0);
return 1;
}
p.s. ID is a global var
and this IP doesnt work properly
pawn Код:
PlayerInfo[playerid][pIP] = GetPlayerIp(playerid, PlayerInfo[playerid][pIP], 16);
GetPlayerName(playerid, pname, sizeof(pname));
format(str, sizeof(str), "%s(%d) has joined the server. Ip: %s", pname, playerid, PlayerInfo[playerid][pIP]);