Teleporting with a vehicle
#8

That could could really be cleaned up..:

pawn Код:
if (strcmp("/spawn", cmdtext, true) == 0)
{
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) SetVehiclePos(GetPlayerVehicleID(playerid), -50.0743,-274.4324,5.4297);
    else SetPlayerPos(playerid, -50.0743,-274.4324,5.4297);
    return 1;
}
1. Why did you specify a length in strcmp? It's just un-needed.
2. Why did you create any variables?
3. Why did you store information in variables and never use them?
4. Why the over-complication?
5. Why check if the player is in a vehicle instead of checking if he is a driver? (Do you want passengers to be able to teleport the vehicle?)
6. Why do you use GetPlayerPos at all?
Reply


Messages In This Thread
Teleporting with a vehicle - by Lanzmeister - 16.08.2011, 23:08
Re: Teleporting with a vehicle - by PRANK - 16.08.2011, 23:21
Re: Teleporting with a vehicle - by Backwardsman97 - 16.08.2011, 23:22
Re: Teleporting with a vehicle - by Lanzmeister - 17.08.2011, 00:00
Re: Teleporting with a vehicle - by PRANK - 17.08.2011, 00:13
Re: Teleporting with a vehicle - by mprofitt - 17.08.2011, 00:15
Re: Teleporting with a vehicle - by Tigerbeast11 - 17.08.2011, 00:17
Re: Teleporting with a vehicle - by JaTochNietDan - 17.08.2011, 00:21

Forum Jump:


Users browsing this thread: 4 Guest(s)