Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:putpizza(playerid, params[])
- {
- if(IsInJob[playerid] == 1)
- {
- if(IsPlayerAttachedObjectSlotUsed(playerid,PIZZA_INDEX))
- {
- if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
- {
- new Float:X,Float:Y,Float:Z;
- for(new j=0;j<5;j++)
- {
- GetVehiclePos(pizzabikes[j],X,Y,Z);
- if(IsPlayerInRangeOfPoint(playerid,3.0,X,Y,Z))
- {
- if(PizzaBikesPizzas[GetPlayerVehicleID(j)] <= 4)
- {
- new string[56];
- PizzaBikesPizzas[GetPlayerVehicleID(j)]=5;
- SendClientMessage(playerid,-1," Ai pus {FF0000}5 {FFFFFF}pizza!");
- RemovePlayerAttachedObject(playerid, PIZZA_INDEX);
- ClearAnimations(playerid);
- PlayerTextDrawHide(playerid,PizzasText[j]);
- format(string,sizeof(string),"Pizza: ~r~%d~w~ /~g~ 5",PizzaBikesPizzas[GetPlayerVehicleID(j)]);
- PlayerTextDrawSetString(playerid,PizzasText[j],string);
- PlayerTextDrawShow(playerid,PizzasText[j]);
- SendClientMessage(playerid,-1,"Pizza a fost pusa");
- ApplyAnimation(playerid, "INT_HOUSE", "wash_up",4.1,0,0,0,0,0,1);
- return 1;
- }
- else
- {
- SendClientMessage(playerid,-1," Aceasta motocicleta are deja 5 pizza!");
- return 1;
- }
- }
- }
- }
- else return SendClientMessage(playerid,-1," Trebuie sa fii pe jos pentru a pune pizza!");
- }
- else return SendClientMessage(playerid,-1," Trebuie sa ai o pizza in mana");
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment