#1

i think i typed something wrong..

if(strcmp("/car1", cmdtext, true, 5) == 0)
{
if(IsPlayerAdmin(playerid))
{
GivePlayerCar(playerid, 533, 1);
}
return 1;
}


error 017: undefined symbol "GivePlayerCar"
Reply
#2

Because "GivePlayerCar" isn't SA:MP function, i don't know where you got that from.
Reply
#3

Quote:
Originally Posted by Don Correlli
Because "GivePlayerCar" isn't SA:MP function, i don't know where you got that from.
i don't know too

i thought it was good but what is the good one??
Reply
#4

pawn Код:
if(strcmp("/car1", cmdtext, true) == 0)
{
    if(IsPlayerAdmin(playerid))
    {
        new Float:x, Float:y, Float:z, Float:angle;
        GetPlayerPos(playerid, x, y, z);
        GetPlayerFacingAngle(playerid, angle);
        new car = CreateVehicle(533, x, y, z, angle, -1, -1, 600);
        PutPlayerInVehicle(playerid, car, 0);
    }
    return 1;
}
Reply
#5

Quote:
Originally Posted by MadeMan
pawn Код:
if(strcmp("/car1", cmdtext, true) == 0)
{
    if(IsPlayerAdmin(playerid))
    {
        new Float:x, Float:y, Float:z, Float:angle;
        GetPlayerPos(playerid, x, y, z);
        GetPlayerFacingAngle(playerid, angle);
        new car = CreateVehicle(533, x, y, z, angle, -1, -1, 600);
        PutPlayerInVehicle(playerid, car, 0);
    }
    return 1;
}
thankyou very much man, i could never make that myself..
i only got 1 error.

C:\Users\Onno\Documents\ALLIN1\da\gamemodes\saa.pw n(321) : warning 209: function "OnPlayerCommandText" should return a value
C:\Users\Onno\Documents\ALLIN1\da\gamemodes\saa.pw n(322) : error 010: invalid function or declaration


if(strcmp("/car1", cmdtext, true) == 0)
{
if(IsPlayerAdmin(playerid))
{
new Float, Float:y, Float:z, Float:angle;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, angle);
new car = CreateVehicle(415, x, y, z, angle, -1, -1, 600);
PutPlayerInVehicle(playerid, car, 0);
}
return 1;
}
}
return 0; <--322
}
Reply
#6

You have too many brackets under return 1. Remove one.
Reply
#7

pawn Код:
if(strcmp("/car1", cmdtext, true) == 0)
{
if(IsPlayerAdmin(playerid))
{
new Float:x, Float:y, Float:z, Float:angle;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, angle);
new car = CreateVehicle(415, x, y, z, angle, -1, -1, 600);
PutPlayerInVehicle(playerid, car, 0);
return 1;
}

}

  return 0;  
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)