Wysłany: 2014-10-21, 18:08
awfesa
Wiek: 29 Na forum: 4705 dni Posty: 563
Piwa : 223
Mam taki kod i jak zrobi? aby komend? tylko dzia?a w 4 wyznaczonych pojazdach a nie w wyznaczonych id pojazd?w
Pojazdy
Pawn
pizza [ 0 ] = AddStaticVehicle ( 448 , 2122.1677 ,- 1784.2250 , 12.9837 , 180.4585 , 0 , 0 ); // Pizza 1
pizza [ 1 ] = AddStaticVehicle ( 448 , 2121.9895 ,- 1784.7623 , 12.9867 , 181.5936 , 0 , 0 ); // Pizza 1
pizza [ 2 ] = AddStaticVehicle ( 448 , 2118.8469 ,- 1784.5692 , 12.9880 , 181.5090 , 0 , 0 ); // Pizza 2
pizza [ 3 ] = AddStaticVehicle ( 448 , 2115.7837 ,- 1784.6464 , 12.9860 , 181.6605 , 0 , 0 ); // Pizza 3
CMD
Pawn public OnPlayerCommandText ( playerid , cmdtext [])
{
if ( strcmp ( "/pizza" , cmdtext , true , 10 ) == 0 )
{
if( GetVehicleModel ( GetPlayerVehicleID ( playerid )) == 448 )
{
PizzaJob [ playerid ] = 1 ;
new name [ MAX_PLAYER_NAME ], string [ 48 ];
GetPlayerName ( playerid , name , sizeof ( name ));
format ( string , sizeof (string), "* %s is now a Pizzaboy." , name );
SendClientMessageToAll ( COLOR_YELLOW , string );
SetPlayerCheckpoint ( playerid , 2012.6134 ,- 1729.3796 , 13.1536 , 10 );
SendClientMessage ( playerid , COLOR_YELLOW , "* Follow the red markers and you'll recieve money!" );
return 1 ;
}
SendClientMessage ( playerid , COLOR_RED , "You have to be on a pizza bike to start the job!" );
}
return 0 ;
}
Podpis
Cokolwiek robicie w swoim życiu, nie będzie to legendarne,
jeżeli wasi przyjaciele nie będą mogli tego zobaczyć.
Wysłany: 2014-10-21, 18:13
xqz
otaku desu!
Wiek: 32 Na forum: 6406 dni Posty: 723
Nick w MP: xqz
Piwa : 5465
Kod: public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/pizza", cmdtext, true, 10) == 0)
{
new omg=GetPlayerVehicleID(playerid);
if(omg == pizza[0] || omg == pizza[1] || omg == pizza[2] || omg == pizza[3] )
{
PizzaJob[playerid] = 1;
new name[MAX_PLAYER_NAME], string[48];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "* %s is now a Pizzaboy.", name );
SendClientMessageToAll(COLOR_YELLOW, string);
SetPlayerCheckpoint(playerid,2012.6134,-1729.3796,13.1536,10);
SendClientMessage(playerid,COLOR_YELLOW,"* Follow the red markers and you'll recieve money!");
return 1;
}
SendClientMessage(playerid, COLOR_RED,"You have to be on a pizza bike to start the job!");
}
return 0;
}
Wysłany: 2014-10-21, 20:25
awfesa
Wiek: 29 Na forum: 4705 dni Posty: 563
Piwa : 223
Dzia?a wielkie dzi?ki
dla ciebie
Podpis
Cokolwiek robicie w swoim życiu, nie będzie to legendarne,
jeżeli wasi przyjaciele nie będą mogli tego zobaczyć.
Tagi: cmd :: tylko :: pojazdach
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: