Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - bilakispa

Pages: [1]
1
mIRC/pawn Scripting / Re: [pawn] Dcmd command errors
« on: March 05, 2010, 12:23:38 am »
Code: [Select]
if (!strcmp(cmd, "!fix", true))
{
if (!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "You are not in a vehicle");
if (GetPlayerState(playerid) != 2) return SendClientMessage(playerid, COLOR_RED, "You can't fix the vehicle as a passeger");
new vehicleid=GetPlayerVehicleID(playerid);
GetVehiclePos(vehicleid, x, y, z);
GetPlayerFacingAngle(playerid, rot);
SetVehiclePos(vehicleid, x, y, z, rot);
SetVehicleHealth(vehicleid, 1000.0);
    SetVehicleTyre(vehicleid, 1);
SetVehicleLights(vehicleid, 1);
return SendClientMessage(playerid, COLOR_GREEN, "Car fixed!");
}
Nevermind, putted strcmp.

But, does SetVehiclePos() works for you?
I've tried lots of ways but SetVehiclePos() doesn't work.

2
mIRC/pawn Scripting / [pawn] Dcmd command errors
« on: March 04, 2010, 12:32:37 am »
Aww, damn it! I can't find what's wrong with this. (Note: I have defined dcmd.)

Code: [Select]
public OnPlayerCommandText(playerid, cmdtext[])
{
     dcmd(fix,3,cmdtext); //<--------- LINE 67
     ...other commands..
     return 0;
}

dcmd_fix(playerid, params[])
{
#pragma unused params
if (!IsPlayerInAnyVehicle(playerid)) SendClientMessage(playerid, COLOR_RED, "You are not in a vehicle");
else
{
if (GetPlayerState(playerid) == 2)
{
int vehicleid=GetPlayerVehicleID(playerid); float x,y,z;
RemovePlayerFromVehicle(playerid);
GetVehiclePos(vehicleid, x, y, z);
SetVehicleToRespawn(vehicleid);
SetVehiclePos(vehicleid, x, y, z, 0);
PutPlayerInVehicle(playerid, vehicleid);
}
else SendClientMessage(playerid, COLOR_RED, "You can't fix the vehicle as a passenger");
}
return 1;
}

Compiler Output:
Code: [Select]
C:\Program Files\Rockstar Games\GTA Vice City - Server\gamemodes\mode.pwn(67) : error 029: invalid expression, assumed zero
C:\Program Files\Rockstar Games\GTA Vice City - Server\gamemodes\mode.pwn(67) : error 029: invalid expression, assumed zero
C:\Program Files\Rockstar Games\GTA Vice City - Server\gamemodes\mode.pwn(67) : warning 215: expression has no effect
C:\Program Files\Rockstar Games\GTA Vice City - Server\gamemodes\mode.pwn(67) : error 001: expected token: ";", but found ")"
C:\Program Files\Rockstar Games\GTA Vice City - Server\gamemodes\mode.pwn(67) : fatal error 107: too many error messages on one line


Also, shouldn't be a GetVehicleRot Function for the vehicle rotation?

3
mIRC/pawn Scripting / Re: pawn commands
« on: March 02, 2010, 07:40:40 pm »
zcmd would be the fastest of those.
Indeed, but in this version it doesn't support CallLocalFunction, you will have compiler errors.

Dcmd is fast too, learn it

4
mIRC/pawn Scripting / Re: Problem...
« on: March 02, 2010, 03:06:09 pm »
We can't give you an example. Does the compiler give you any errors or warnings? Copy paste the log.

Pages: [1]