needing help
#5

ZCMD
pawn Код:
COMMAND:v(playerid, params[])
{
    new tmp;
    if(sscanf(params,"i",tmp)) return SendClientMessage(playerid,COLOR_WHITE,"Usage: /adcar [CarID]");
    else
    {
        new Float:x,Float:y,Float:z,Float:Angle;
        GetPlayerPos(playerid,x,y,z);
        GetPlayerFacingAngle(playerid,Angle);
        CreateVehicle(tmp,x+2*floatsin(-Angle, degrees),y+2*floatcos(-Angle, degrees),z+1,Angle+90,0,0,99999999999);
        return 1;
    }
}
strtok
pawn Код:
if(strcmp(cmd, "/v", true) == 0)
{
    new tmp[256];
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /v [carid]");
    new modelid= strval(tmp);
    new Float:x,Float:y,Float:z,Float:Angle;
    GetPlayerPos(playerid,x,y,z);
    GetPlayerFacingAngle(playerid,Angle);
    CreateVehicle(modelid,x+3*floatsin(-Angle, degrees),y+3*floatcos(-Angle, degrees),z+1,Angle+90,0,0,99999999999);
    return 1;
}
Reply


Messages In This Thread
needing help - by _Sprite_ - 16.12.2010, 14:21
Re: needing help - by Ash. - 16.12.2010, 14:24
Re: needing help - by _Sprite_ - 16.12.2010, 14:28
Re: needing help - by blackwave - 16.12.2010, 14:36
Re: needing help - by veyron - 16.12.2010, 14:47

Forum Jump:


Users browsing this thread: 1 Guest(s)