26.05.2011, 17:48
PHP код:
new kP, kE, kV;
//OnPlayerCommandText
if( !strcmp( cmdtext, "/testcheck", true ) )
{
GameTextForPlayer( playerid, "Voce precisa pegar as cargas!", 5000, 1 );
kP = SetPlayerCheckpoint( playerid, 2620.7441, -2226.8093, 13.3810, 20.0 );
return true;
}
public OnPlayerEnterCheckpoint( playerid )
{
if( IsPlayerInCheckpoint( kP ) )
{
GameTextForPlayer( playerid, "Voce precisa entregar as cargas!", 5000, 1 );
DisablePlayerCheckpoint( kP );
kE = SetPlayerCheckpoint(playerid, 2620.7441, -2226.8093, 13.3810, 20.0 );
return true;
}
if( IsPlayerInCheckpoint( kE ) )
{
GameTextForPlayer( playerid, "Voce completou a entrega. Retorne a empresa", 5000, 1 );
DisablePlayerCheckpoint( kE );
kV = SetPlayerCheckpoint( playerid, 1129.7092, -1563.1699, 13.5464,20.0 );
return true;
}
if( IsPlayerInCheckpoint( kV ) )
{
GameTextForPlayer( playerid, "Voce completou a sua entrega", 5000, 1 );
DisablePlayerCheckpoint( kV );
GivePlayerMoney( playerid, 1000 );
return true;
}
return true;
}