26.11.2011, 22:35
he said skin 287 so
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/spikes", cmdtext, true, 8) == 0)
{
if ( GetPlayerSkin ( playerid ) > 279 || GetPlayerSkin ( playerid ) < 288 )
return SendClientMessage( playerid, -1, #only skin id 280-287 );
new vehicleid = GetPlayerVehicleID(playerid);
if(vehicleid == 0){
new Float:X, Float:Y, Float:Z, Float:A;
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, A);
CreateSmallStinger(X+(6.0*floatsin(-A, degrees)), Y+(6.0*floatcos(-A, degrees)), Z-0.825, A, GetPlayerVirtualWorld(playerid), 60000);
}
else{
new Float:X, Float:Y, Float:Z, Float:A;
GetVehiclePos(vehicleid, X, Y, Z);
GetVehicleZAngle(vehicleid, A);
CreateLargeStinger(X-(10.0*floatsin(-A, degrees)), Y-(10.0*floatcos(-A, degrees)), Z-0.325, A, GetPlayerVirtualWorld(playerid), 60000);
}
return 1;
}
if (strcmp("/removespikes", cmdtext, true, 15) == 0)
{
if ( GetPlayerSkin ( playerid ) < 280 || GetPlayerSkin ( playerid ) > 290 )
return SendClientMessage( playerid, -1, #only skin id 280-290 );
new Float:X, Float:Y, Float:Z;
for(new stingerid = 0; stingerid < sizeof(iPickups); stingerid++){
if(iPickups[stingerid][0] == -1)
continue;
GetObjectPos(iPickups[stingerid][0], X, Y, Z);
if(IsPlayerInRangeOfPoint(playerid, 3.0, X, Y, Z)){
DestroyStinger(stingerid);
break;
}
}
return 1;
}
return 0;
}