28.07.2012, 07:30
Today I learned how to make a simple teleport command.
Quote:
if (strcmp("/lv", cmdtext, true, 10) == 0) { SetPlayerPos (playerid, 2002.1925,1543.9114,13.5859); SetPlayerInterior (playerid, 0); SendClientMessage (playerid, 0xaa3333a, "Welcome to Las Venturas."); SendClientMessage (playerid, 0xFFFFFFF, "This area is free to map!"); return 1; } if (strcmp("/lvair", cmdtext, true, 10) == 0) { SetPlayerPos (playerid, 1592.0784,1171.6952,14.2241); SetPlayerInterior (playerid, 0); SendClientMessage (playerid, 0xaa3333a, "Welcome to Las Venturas Airport."); SendClientMessage (playerid, 0xFFFFFFF, "This area is free to map!"); return 1; } if (strcmp("/sfair", cmdtext, true, 10) == 0) { SetPlayerPos (playerid, -1161.7926,33.5112,14.1484); SetPlayerInterior (playerid, 0); SendClientMessage (playerid, 0xaa33331, "Welcome to San Fierro Airport."); SendClientMessage (playerid, 0xFFFFFFF, "This area is free to map!"); return 1; } if (strcmp("/home", cmdtext, true, 10) == 0) { SetPlayerPos (playerid, -49.6428,-270.6409,6.6332); SetPlayerInterior (playerid, 0); SendClientMessage (playerid, 0xaa33331, "Welcome to Home. The place you spawned."); SendClientMessage (playerid, 0xFFFFFFF, "This area is free to map!"); return 1; } return 0; |