Turtle
#5

pawn Код:
new Squirtle[MAX_PLAYERS];
new SquirtleTime[MAX_PLAYERS];

forward Squirtle_I_Choose_Youuuuu(playerid)
public Squirtle_I_Choose_Youuuuu(playerid)
{
    new Float:phrr[4];
    GetPlayerPos(playerid, phrr[0],phrr[1],phrr[2]);
    //GetPlayerFacingAngle(playerid, phrr[3]);
    MoveObject(Squirtle[playerid], phrr[0]+0.5,phrr[1],phrr[2]/*,phrr[3],0,0*/);//uncomment this and the facing angle line if yo're using 0.3D
}

COMMAND:GOsquirtle(playerid,params[])
{
    if( GetPlayerScore(playerid) >= 1000)
    {
        new Float:x1,Float:y1,Float:z1,Float:a;
        GetPlayerPos(playerid,x1,y1,z1);;
        GetPlayerFacingAngle(playerid, a);
        Squirtle[playerid] = CreateObject(1609,x1,y1,z1-1,a,0.0,0.0);
        SquirtleTime[playerid] = SetTimerEx("Squirtle_I_Choose_Youuuuu",1000,true, "i", playerid);
        SendClientMessage(playerid, 0x00FF00FF,"You have bought turtle");
        RewardPlayer(playerid, -40000, 0);
    }
    return 1;
}

//OnPlayerDisconnect or when he leave the turtle
KillTimer(SquirtleTime[playerid]);
i did this while i was talkin with my mother on skype so i'm sorry if have some problem...
Reply


Messages In This Thread
Turtle - by wumpyc - 06.10.2011, 16:19
Re: Turtle - by Pharrel - 06.10.2011, 16:22
Re: Turtle - by wumpyc - 06.10.2011, 16:26
Re: Turtle - by wumpyc - 06.10.2011, 16:50
Re: Turtle - by Pharrel - 06.10.2011, 17:00
Re: Turtle - by =WoR=G4M3Ov3r - 06.10.2011, 17:56
Re: Turtle - by Pharrel - 06.10.2011, 18:08
Re: Turtle - by wumpyc - 07.10.2011, 04:32

Forum Jump:


Users browsing this thread: 2 Guest(s)