I can't? (/spawncar)
#1

pawn Код:
CMD:spawncar(playerid, params[])
{
    new carid, string[128], string1[128];
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You do not have the privilege to access this command!");
    if(sscanf(params,"d", carid)) return SendClientMessage(playerid, 0xFF0000FF,"USAGE: /spawncar [id]");
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    format(string, sizeof(string), "%d", carid);
    AddStaticVehicle(string, x, y, z, 0, 0, 0);
    format(string1, sizeof(string1), "You have spawned car id %d.", carid);
    SendClientMessage(playerid, 0xFF0000FF, string1);
    return 1;
}
Код:
C:\Documents and Settings\eros\Desktop\SAMP Server\filterscripts\afs.pwn(922) : error 035: argument type mismatch (argument 1)
Line 922
pawn Код:
AddStaticVehicle(string, x, y, z, 0, 0, 0);
Reply
#2

pawn Код:
CMD:spawncar(playerid, params[])
{
    new carid, string1[128];
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You do not have the privilege to access this command!");
    if(sscanf(params,"d", carid)) return SendClientMessage(playerid, 0xFF0000FF,"USAGE: /spawncar [id]");
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    AddStaticVehicle(carid, x, y, z, 0, 0, 0);
    format(string1, sizeof(string1), "You have spawned car id %d.", carid);
    SendClientMessage(playerid, 0xFF0000FF, string1);
    return 1;
}
Just given it a try.
Reply
#3

weow thanks man
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)