/bike command
#10

Quote:
Originally Posted by Swift_
Quote:
Originally Posted by Abernethy
Well, I win. jks.

pawn Код:
if(strcmp("/bike a", cmdtext, true) == 0)
{
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    CreateVehicle(481, x, y, z, 0.0, -1, -1, 90000);
    SetPlayerPos(playerid, x, y, z+3);
    return 1;
}

if(strcmp("/bike b", cmdtext, true) == 0)
{
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    CreateVehicle(510, x, y, z, 0.0, -1, -1, 90000);
    SetPlayerPos(playerid, x, y, z+3);
    return 1;
}

if(strcmp("/bike c", cmdtext, true) == 0)
{
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    CreateVehicle(509, x, y, z, 0.0, -1, -1, 90000);
    SetPlayerPos(playerid, x, y, z+3);
    return 1;
}
Actually that code would work because you have space in-between the 'bike' and the letter. Thus meaning you'd need strtok. But since you don't the command would return unknown

You lose
Mwhahaha /fail. Yeah, I know my code sucked ass compared to ya'll
Reply


Messages In This Thread
/bike command - by sggassasin - 30.06.2009, 09:23
Re: /bike command - by Grim_ - 30.06.2009, 09:26
Re: /bike command - by refshal - 30.06.2009, 09:28
Re: /bike command - by sggassasin - 30.06.2009, 09:32
Re: /bike command - by Abernethy - 30.06.2009, 09:33
Re: /bike command - by Grim_ - 30.06.2009, 09:34
Re: /bike command - by sggassasin - 30.06.2009, 09:34
Re: /bike command - by refshal - 30.06.2009, 09:35
Re: /bike command - by Grim_ - 30.06.2009, 09:37
Re: /bike command - by Abernethy - 30.06.2009, 09:38

Forum Jump:


Users browsing this thread: 8 Guest(s)